An online petition said new head teacher Fiona Robertson ordered the school bathrooms to be locked during lessons.
The petition which has gained over 2,600 signatures, claimed the toilets were not unlocked during break times.
The school said a key was available in an emergency during class time.
The petition, which refers to Miss Robertson as Mrs X, stated: "As of last week, Mrs X decided that students would no longer be able to use the toilet facilities during class time and proceeded to lock all bathrooms to prevent us from using said facilities.
"The toilets were then promised to be unlocked at interval and lunch but so far this has failed to happen.
"The motive behind this idiocy seems sensible. Mrs X does not approve of the number of people being excused from class and fears people may 'hide' in the bathrooms to prevent going to subjects they dislike and fair enough, this does happen.
"However, preventing us from one of our basic human rights is not the way to solve the problem."
A Perth and Kinross Council spokeswoman said the toilets were not locked during break times and that a key was available for pupils in an emergency during class time.
The spokeswoman said:  "There has been an ongoing issue with a large number of pupils asking to be excused during class time.
"The head teacher has taken steps to reinforce the school's existing policy that pupils should not be out during class time unless under exceptional circumstances.
"We will work with the school's staff, pupils and parents to ensure that everyone understands the policy and how it is being implemented."
Perth Grammar School has denied a claim that it has imposed an outright ban on pupils using the toilet during class time.