Trichotillomania (Hair Pulling) Support Group
Impulsive control disorder is the inability to resist an urge, temptation, or impulse, even when it may cause negative effects to the self or to others. If you or a loved one suffers from impulsive contorl disorder, join the community to find support and share your challenges with others who know what you're going through.

Some people find that putting something scented, like lotion or perfume, on their wrists makes them notice when their hands go near their hair so they can stop themselves from pulling.
You can also try wearing band aids on your fingers to stop yourself from pulling. If anyone asks about it, just say you are doing it to stop yourself from biting your nails. I hope that helps!
You could get some fun pencil toppers, that's something discrete to play with.
Also I've read about tying some flavoured floss to the top of a pencil/pen, and you can play with this during class.
How about purchasing some large animal shaped erasers or other characters, these would be a nice textural feel while holding in your fingers or hand as they are somewhat soft and pliable. Maybe some with beady eyes watching over you so you won't feel the need to pull. I like to intertwine a pencil in my fingers on my pulling hand to keep aware.
Experimenting with many options is the trick to find out what works for you.