A secondary school has urged pupils to remain vigilant after a man was arrested following reports he had been “talking inappropriately” to a child.