A school has warned parents and pupils after the worrying incident