Professor Green, whose real name is Stephen Paul Manderson, said Clare Kelly of St Thomas of Aquin's High School was "one reason schools fail people".
His comments came in an exchange on the social networking website Twitter after the Londoner had spotted her comments.
The drama and guidance teacher had tweeted "Born for better things ... when's the next holiday?"
Green, who was discusssing the motivation of teachers with his two million followers, wrote: "I'm about to give you an example of why schools fail people" and re-tweeted her message.
Ms Kelly reported herself to the headteacher as soon as the furore erupted.
Teachers are regularly warned about the perils of posting on social media and advised careless remarks could land them in disciplinary trouble.
Green seems to have become aware of Ms Kelly's comment after she entered into discussion with Green, who turned down a place at private school to attend a state school. He had stated that "there's so much more to life" than exam results.
The teacher was met with a swarm of criticism online, including from former pupils. However, others rallied behind the teacher.
A City of Edinburgh Council spokesman said: "The teacher realised she had made an error of judgement and went to see the head teacher immediately to apologise. Appropriate action has been taken."