I would very much recommend against attempting to block instant messaging outright, for two reasons.
1) Telegram by itself does not expose students to adult content any more than Whatsapp, Discord, Facebook Messenger, or any other instant messaging platform.
2) In my experience, when you get heavy-handed with network restrictions in this manner you will not actually prevent the behavior you are trying to stop, you will instead push clients to download sketchy alternative apps that are less safe/less moderated or to VPNs, or they will just switch to cellular data.
It is my belief in general that you are much better off having the apps allowed but categorizing the traffic with NBAR and having some record that the clients were using the app if an incident occurs (in case they delete the app/wipe their phone, etc to try to pretend they weren't part of some incident)