Check the Thai Government website as it will detail this. In UK for example I think bona-fide students can work up to 10 hours a week but check what the rules are here.
Well I tried today at Chiang mai immigration and they were happy with everything until the last person to check my paperwork and wouldn't issue the extension as she calculated that I couldn't apply until tomorrow as my Visa runs out on Aug 2nd and 45 days before is June 19th not June 18th despite her colleagues agreeing 45 days before is June 18th...... what a bummer.
One last question. I've just been told that because I'm getting an extension again for my Non-O visa that there is no "under consideration" period and I should get the extension stamped and a re-entry permit granted the same day. If this is true I can fly home a week earlier. Can anyone confirm this?