I have seen it done, but it is not in keeping with the canons in Australia, at least. I am not sure about law and practice elsewhere.
This is a great big grey area with lots of red flags in it. Technically, there is no canon law requirement (that I am aware of) for parental consent. However, in our social context, to do anything with a child, without a parent's consent, in church, would be a huge problem given the whole legacy of clergy abuse etc etc. I have been advised never to baptise a minor without a parent or guardian's consent. If a child had reached the age where they were able to make their own medical decisions, live out of home, etc, one might make an exception, but even then I would think very carefully about it.
I have known a child as young as eleven, who attended church with her grandmother (and was being fostered by her grandmother due to issues in the family), to ask for baptism on her own initiative. We had to decline, not least because the conditions of foster care did not allow her grandmother to give permission for such a thing, and her parents would/could not.