The following statement is correct:
My teacher said that all of it was correct, with only one exception.
If you wish to use "most of it", then the sentence is better framed along the lines of:
My teacher said that most of it was correct, the only exception being (go on to elaborate what was wrong).
This is not the same question, but a related/similar one: http://english.stackexchange.com/questions/73649/other-ways-of-saying-except-for-onehttps://english.stackexchange.com/questions/73649/other-ways-of-saying-except-for-one