Why would anyone even consider baptizing someone when it is known that they would not want it? That impresses me as being extremely arrogant.
My understanding is that while such a baptism might be valid, it would certainly be illicit - a violation of Canon law. One could potentially run into problems under civil law too. It’s been a while, but I remember reading about a case where the parents of a child who was in the emergency room and near death sued the hospital chaplain, a Catholic priest, for battery after he baptized the child even after they expressly said not to.