Technically, the answer is no.
If a teacher leaves a job for whatever reason, they need to hand back the work permit to the labor department and the visa that goes with that work permit becomes null and void.
You then have to leave the country (usually within 7 days) to obtain a new visa at a Thai embassy or consulate in a neighboring country.
However, there are rarely any black and white answers in Thailand, and some teachers (probably very few I might add) have had success transferring the visa but not the work permit, while others have had success transferring both work permit and visa due to the fact that the paperwork for the new job was completed in time (before the end of the first contract)
If that doesn't sound like a straight answer, then that's because it isn't one. This is another one of those situations where as the teacher, you need to rely on both your past and previous employers to get all their ducks in a row.
It rarely happens that way in truth - so be prepared to leave the country for a visa run.