Staff called in police on Tuesday after receiving reports that a boy was spotted with the knife in the main amphitheatre area of the new £30million school building.
Police confirmed that a youth was taken into custody, saying: “A schoolboy has been reported to the relevant authority in relation to having an offensive weapon in his possession.”
It is understood that the boy has been temporarily excluded from the school while investigations continue.
Local councillor Barry Jarvis, who serves on the school’s parent council, said: “I am happy to see that action was taken immediately by the school and that the alleged incident was deal with quickly and efficiently.”
A spokesman for Moray Council confirmed there was an incident at the school on Tuesday but declined to comment further.
Police Scotland have advised that instances of pupils taken knives to school are extremely rare in Scotland. However, they urge all pupils to be constantly aware of the dangers with their website advising: “Knife possession and knife crime are rare in Scottish schools. However, if you know of someone who takes a knife to school, it is important that you tell someone.
Report your worries to a teacher, or telephone Crimestoppers on 0800 555 111, where you can pass on the information anonymously.”