It's difficult to give an informed response to a situation you know little about, so obviously take everyone's opinion or guidance with a pinch of salt.
Sounds like your girlfriend is playing you for a fool though. Does she constantly text her ex-boyfriend when you are around? If yes, surely she should have the respect not to do so if she knows it bothers or upsets you. Not to mention the fact it is just plain rude. If I'm in the company of anyone, I have the respect not to get into a conversation with someone on my mobile phone.
It sounds like you are insecure about the relationship and don't trust her. You either need to have serious and frank talks with her, or break-up. There's no reason for her not to be friends with her ex (I am with mine), but if suspicions are raised already, it's not a good sign is it?