Well you can believe her and go on spending the rest of your life with her if you intend to take your relationship further or you can dump her for the past which doesn’t actually matter for the future as long a she loves you. But if you ask me, no girl in her right mind would say she had been impregnated by her ex. Saying she has had sex is one while saying she had once been pregnant is one. For all that has been told, if you know her love towards you is true, don’t dig up her past, let her forget it and live on.
But if the idea of the girl having been used up by some other guy is bothering you, leave her and move the hell of out of her life since you’re no good for her. There is no aspect of betrayal on her part. Let us assume she confessed the truth, but what was the need for that confession? She had confessed only because she believed you to be a good guy and not a dick like her ex.
No girl would confess or open up her past for sympathy, so there is no reason for worrying about it. If you love her and she loves you, put other things to rest and move on with your lives.