YAY! I get to disagree with @Tenderiser! I work in education and where I am there's a definite drive to keep the professional professional and the personal personal. This isn't just because you might slander the student in question, but because you could also go too far in the opposite direction and show too much favour to the student in question, or something else somewhere between. If you name a character in your book after a student, you're showing that student special affection/interest/favour. How might another student in the same class feel about that? A was special enough to be included in the book, but B wasn't. The teacher (or whatever) likes A better. Nothing good comes from this perception. A more sinister extrapolation would be grooming - a teacher showing special favour to a specific student could be doing it for a nefarious reason. I'm not saying any of these things are your intentions, OP, or that any of these things would necessarily result from your actions. But it's important to avoid not only impropriety itself, but also the appearance of impropriety, and I think that's the issue you may be running into.
I disagree with you on principle. Or possibly principal, depending on the educational environment in question...
From a PC point of view, you have a duty of care and responsibility to protect children. Pandering to a child by naming a character after them may well be interpreted as an intentional act in order to groom a child. This befriending can continue on lines of "oh come over to my house, or sit in my car and listen to what I have written.." , not that I am suggesting that is what you would do, but there is potential for that event to happen, someone who has intentions to commit sexual assault on a child now has a good chance to do that with this window of opportunity. Administrators have to play it safe and it is better to just put a blanket ban on everything to prevent a rare chance of something like the above from happening, so that is why you are being told to remove it, not just for the childs protection but for yours as well.
Yes, its an evil world we live in and even slightest allegation, mud sticks. Of course no one is suggesting that is what you are doing, but its all about risk and preventing incidents, so we have over the top legistlation and teachers in UK are in position where they can not really even touch a child, even to restrain.