So did the mother declare herself to be [forename] [father's surname], formerly X?
If so, it sounds like she was fibbing, but no one would have checked. Provided the mother was married, or said she was and was a plausible liar, the father could be named, irrespective of whoever registered the birth.