I think whoever this guy is, he is doing a serious number on your head. The only way the baby would not be from the person with whom you had sex all of July, is if the baby was radically premature and you had sex with someone different in August. But if you were told the same due date from the earliest of your ultrasounds, and if the doctor didn't say "Wow, your baby sure came weeks early!" or anything, your due date does point to conception in July.
It is time to go see a lawyer, or to make an appointment at a legal-services clinic. You sound like this guy will not take a DNA test. And he needs to. The two of you and the baby need to go to an official lab and get swabbed. You need to witness the dad doing the swab (so he will not send a buddy in his place) and it needs to be done at a lab certified by the family courts for determining paternity. (Not a drugstore test.) Your lawyer can see that the guy gets summoned by the courts to do this, if necessary. You have this legal right, don't let your head-trip ex confuse you and strip away your rights and the baby's right to have a record of who the dad is.
No, you would have had a ten-month pregnancy if you got pregnant in June and had a baby in April. Doctors don't let women go ten months.