I have heard of priests who delay baptism until they are sure that there is reasonable hope the child will be brought up as a Catholic. The parents are usually given some sort of guidelines as to what will constitute “proving” it.
In our parish, every couple months, there is a baby who is baptized whose parents are not married. As some women do not take their husbands’ last names when they marry, it’s hard to tell from the list in the bulletin, and it’s really none of my business.