With an illegitimate birth, the father’s name only appears on the certificate if he was present at the birth registration and confirmed paternity. (Otherwise a mother could name anyone with obvious difficulties if the information was not accurate). Where the parents are married, there’s a presumption of legitimacy and so they don’t both need to be there at the registration. Indeed neither needs to be there!
You could check with the local church to see if your ancestor was baptised. The father’s name might be listed there.