Jem - I was a thumb sucker when I was younger - I remember my Grandad saying I would suck all the goodness out of it, but that never stopped me. I also wet the bed up until I was around 8 years old, both of which I grew out of.
I am sure now your grandaughter has started school, she will gradually move on and to be honest the teacher should try and distract her with activities. She obviously finds the thumb sucking a comfort and perhaps is still finding her feet and confidence in school.
I do wonder how much, if at all, the kids are teasing her, or if the teacher has the problem with it..........its worth a thought.