The Urdu 'prayer' that got UP headmaster suspended is a poem by Iqbal; read full text
The prayer in question is a poem by Allama Iqbal, titled 'Lab Pe Aati Hai Dua', and is reportedly part of the Urdu Syllabus. Iqbal also wrote the song 'Saare Jahaan Se Accha'

Uttar Pradesh's Pilibhit village was witness to a strange occurrence: The headmaster of a government school was suspended after the Vishva Hindu Parishad (VHP) accused him of making students recite an Urdu 'prayer', which they alleged was recited at madrassas. The District Magistrate said that the headmaster was suspended because he did not make the students sing the national anthem; the headmaster denied this, and it was not part of the VHP's complaint, either.
Furkan Ali, the headmaster, questioned his suspension. Weren't the students made to sing the 'Saraswati Vandana' and 'Itni Shakti Hume De Na Data'?
Notably, the 'prayer' in question is not a prayer; it is a nazm (poem) by Allama Iqbal titled 'Lab Pe Aati Hai Dua'. Ali says the poem is part of the Urdu syllabus, reports Indian Express.
Iqbal also wrote the song 'Saare Jahaan Se Accha'.
Here is the poem in full. It was first published on Rekhta.
***
lab pe aatii hai du.aa ban ke tamannaa merii
zindagii sham.a kii suurat ho KHudaayaa merii!
duur duniyaa kaa mire dam se a.ndheraa ho jaa.e!
har jagah mere chamakne se ujaalaa ho jaa.e!
ho mire dam se yuu.nhii mere vatan kii ziinat
jis tarah phuul se hotii hai chaman kii ziinat
zindagii ho mirii parvaane kii suurat yaa-rab
ilm kii sham.a se ho mujh ko mohabbat yaa-rab
ho miraa kaam Gariibo.n kii himaayat karnaa
dard-mando.n se za.iifo.n se mohabbat karnaa
mire allaah! buraa.ii se bachaanaa mujh ko
nek jo raah ho us rah pe chalaanaa mujh ko