I would say that a student has a responsibility to learn in class. A cellphone would obviously interfere with that. If the school has a no-phone policy, then the rebbe/teacher should take it away. They can make an attempt to give it back to the student but if they find the same student with the phone on another occasion, then I would say take it away and only give it back to the parents, who have to be made to agree not to allow the student to bring it to school. If a person cannot handle something responsibly, then they should not be allowed to have it.