Redsy
This is an interesting question, here is how I see it.
If the bathroom has a dedicated 20 amp circuit, it can be taken from the 20 amp circuit. IF the lighting is not from that circuit, no it cannot be taken from the lighting circuit.
Provided the towel bar is not hardwired, and is cord and plug connected, the receptacle will also be required to be GFCI protected.

Pierre


Pierre Belarge