I would say it depends on the length of the class. IIRC, a typical high school class, for instance, was roughly 40-45 minutes long. Ten minutes is a significant part of the class to miss on a daily basis.
A better solution might be to pray during lunchtime. It may not be exactly at noon, but since the hours are spaced roughly every 3 hours, there is a window of time in which they can be properly said. Or if there is a study hall period in the day, that could be a good time.
I don't think there is anything wrong with leaving class to pray, I just question the wisdom of missing such a large chunk of time unnecessarily, if other times are available.
On the other hand, some schools have longer block periods, so it would be a smaller percentage of the class. Colleges may have 4+ hour classes, so it's less of a concern. It depends on the school's dynamics, I suppose.