Best way is to do a DNA test with both possible dads as soon as the baby is born. You can even get the authority of the courts behind testing if necessary, as it is in everyone's interest (including society's) to know who a child's parent is. Compared to many prenatal tests, DNA testing is more reliable and less costly when done after the baby comes.