I actually know someone this happened to. His wife had 3 kids before they got married. The youngest wasn't his. She made a big production of it during the divorce. He ended up with all the children anyway. She eventually ended up in rehab for alcoholism.
My reading of what you say is that your friend got her pregnant twice, but didn't marry her for either one of those. And now he is upset that the third child isn't his. How sad and narrow minded of him.
True story...(not about dh nor myself)
Husband deploys. Husband cheats; wife cheats. Husband returns from overseas deployment and happy days. Few months later, she is pregnant. Husband and wife happy, though wife secretly wonders. Husband in delivery room while wife gives birth, baby arrives and doctors say, "It's a boy." Hush falls over the room. New parents urge doctors to hurry up so they can see and hold their new baby boy. Everyone still quiet. Doctor passes baby to nurse, who passes baby to mother and father. Baby boy is mulatto (is that a proper term?). Mom and dad are caucasian.
Speed ahead more than a decade, and everyone still together; boy being raised by mom and husband in delivery room. Somehow, they worked this out.