Yes, this can be done if you are a teacher with a guaranteed job offer but surprise! surprise! there is a certain amount of hassle involved.
A lot of the responsibility rests with your employer, who will need your paperwork in order to apply for a letter from the Thai Ministry of Education. This letter can take anything from 3-6 weeks to obtain.
Because of the hassle involved, many employers take the easy option of asking the teacher to go to a neighboring country such as Laos or Malaysia and apply for a new non-immigrant B visa from a Thai consulate or embassy in that country.