The attack happened in Buthidaung township, one of several areas in lockdown, and it is not clear who was responsible.
Scores of civilians have been killed, hundreds injured and some 100,000 displaced since January last year when both sides stepped up operations.
The AA claims to be fighting for more autonomy for ethnic Rakhine Buddhists.
Teacher Thar Aye Maung from Khamwe village told AFP by phone how his school was hit Thursday morning, injuring 21 pupils.
"One girl is badly hurt. Most of the others have injuries to their hands and legs."
He said all the wounded children were ethnic Khami, a Buddhist minority in a state with a complex patchwork of different groups living alongside the Rakhine.
The fighting was about two miles away from the village, he added.
"We thought the shells couldn’t reach our school."
Maungdaw district chief Soe Aung confirmed the incident, but said 19 children had been wounded.
There was "no reason" to believe the mortar had been fired by the military, said Western command spokesman Colonel Win Zaw Oo, adding the army sometimes loses weapons and ammunition to the rebels.
"(The AA) fires at villages with our shells and then misleadingly claims the military is responsible."
The armed rebel group could not be reached for comment.
The AA has ratcheted up operations in recent months with a series of brazen kidnappings, bombings and raids against the military and local officials.
The army has hit back hard, deploying thousands of soldiers to the area.
Buthidaung is one of nine townships to suffer a government-imposed internet blackout, restrictions decried by rights groups in a statement Thursday.
"(They) disproportionately affect civilians in conflict areas, hampering humanitarian aid operations, livelihoods, and the work of human rights monitors."