It is probably better that people do ask, instead of just doing it anyway. If people want a culture of consent, IMO they can’t afford to be upset if people ask for it.
My head is shaven these days, but in my younger years I used to get way too many offers to mess with my hair. I was not usually offended. Sometimes an offer of braiding or a scalp massage was helpful.