Ok, just to give the dp the benefit of the doubt here for a minute, if a woman found out that she was pregnant and it was unplanned, and she said that it would ruin her life no-one would judge her for saying that. An unplanned pregnancy can come as just as much of a shock to a man as a woman, women don't get the monopoly on being allowed to be upset at being unexpectedly pregnant. What the woman does have is the choice of whether to continue the pregnancy or not.
Personally I think that not using contraception even if you' ex been told that you can't conceive is incredibly naive and careless. And in that sense both are at fault. I know all too many people who have been told that they are infertile or have limited fertility, and who then find themselves pregnant because they thought it was ok not to use contraception. In fact I remember when I decided to stop TTC and saying to my then DH that we should start taking precautions, and his response was that nothing would happen anyway so there didn't seem much point. My response to that was that we'd managed to have one child together and I didn't want to be the woman who found myself pregnant at 43 or so having decided years ago to stop ttc. Ironically he has just had a baby with his now DP.
Op, only you can decide what you want to do here. The fact that you were told you couldn't have children doesn't necessarily mean that you wanted them, only you know the answer to that. If you weren't ready to have a baby at this point there is nothing that says you have to continue the pregnancy. You don't have to feel pressured into continuing the pregnancy just because you feel this might be your only chance. Similarly however if you want this baby, then no-one can make you have a termination.
You do need to think about how you will manage, do you have support? And while your dp may be disinterested now and the relationship may end as a result of this, if you do continue the pregnancy, you will be bound to him for the rest of your lives through this baby. And at some point he may actually pursue a relationship with this child, and that will mean potentially co parenting with someone you no longer have a relationship with, having future step parents in your child's life, having to juggle contact etc, or manage disappointment if he turns out not to be a reliable father. I'm not saying any of this to put you off, but all of these are things you need to consider when you have children with someone who likely won't stay in your life.
Fwiw I am not trying to put you off continuing this pregnancy. Personally I would have the baby, but life just isn't always that black and white, and if you have doubts then they do need to be explored along with any thoughts of the future. Good luck.