The scenario does seem possible from what you say but not enough to be definite.
Was there a baptism? Sometimes the information in that record can be slightly different.
Reading your explanation, I also wondered if the parties had already agreed that the child would be raised by them and ‘offered’ the names so that it was more legitimate.
It seems as though it is a situation that may never be known.