Hi,
I have had this experience too. This is common enough to have a nickname, "silking". There was even a Mom who used to make/sell dolls that had a lock of Mom's hair sewn into them (she doesn't do it anymore). My son developed this habit young, and I encouraged it because it soothed him so much. He never took to a pacifier or any type of lovey. He also does it to the kids in school. It did start to annoy me at some point! I started telling him no and he would get very angry, sometimes hit me. I always try to respond with a hug, some soothing words, and a very kind exlpanation (it hurts Mom), and of course a reminder that hitting is not ok. I understood that it was very soothing to him and I did not want him to feel rejected. It is so profoundly satisfying for young children to touch Mom/Dad. For myself, as much as I love to hug and hold my son (now almost 5), there are times when that gets overwhelming!
I think your son is old enough that you can set a boundry and say no if it annoys you. I would suggest you are clear as to why (it's uncomfortable). I think it's important to teach kids that there are boundries, the important one here being that they can not get pleasure at the expense of others. From talking to Moms, it seems like most kids develop some little soothing habit, like fingering mom/dad's earlobe or, in the case of my friend's daughter holding a finger and pressing on the fingertip. Boys in particular need lots of sensory input, there is a wide range of normal for this. That is not to discourage any evaluation, as it is better to know than to not know! Some parents have had success with a hairpiece. I did not, maybe I tried it too late. He may be old enough to be involved in the process of chooseing a surrogate like a hairpiece (let me know if you want the one I have, light brown, long hair, I'd be glad to send it to you) or something else (maybe a piece of silk?). I would not be happy about knowing that it was being used in the school setting as some kind of leverage. I don't think it should be used to manipulate a child or humiliate.
A great opportunity for similar sensory input could be shaving cream in the bathtub. My son used to love playing with soap from one of those pumps that makes it foamy. I liked this as there is less soap waist, but the feeling is not as intense.
All the best!
C.