Smartphones and social media are increasingly “being weaponised” against schools and teachers, a headteachers’ union leader will say.