Light novel, Chinese or Japanese about a low noble/commoner in a school for kids with magic powers
Ah. I found it by chance. It's "Seirei Gensouki ~Konna Sekai de Deaeta Kimi ni~"

A summary can be found here:
https://zmunjali.wordpress.com/seirei-gensouki-konna-sekai-de-deaeta-kimi-ni/

And the piece that is summarized in detail can be found between chapters 10 and 11 of Act 1.