Woah, I think we need a clarification here.
Working at all for an employer (or for a “principal” or “undertaker” if it’s not technically employment but still labor in exchange for consideration) is illegal for foreigners. That is the starting point.
A work permit grants you as a foreigner the lofty privilege of working in a very specific way: for A employer, from B date to C date, at D address, peforming E type work.
If you become a permanent resident, marry a local, have a working holiday visa, or are subject to a similar condition (the list is not long), you are exempt from the requirement to obtain a work permit.
If your work permit application is being processed, you do not have permission to work.
If you are “just doing a demo”, but there are real students in the classroom, you are presumed to be working.
Now, the buxiban (I assume by “elementary school” you actually mean a buxiban with elementary school students) should know all this, but you can never rule out incompetence and naivete, so maybe they think everything’s okay because the agent said so.