If you:
1. Have an extension if stay (obtained from immigration in Thailand), and
2. You do not have a re-entry permit
3. When you leave Thailand your extension is automatically cancelled
Most people do not want that to happen, however in your case this sequence of events would suit your purpose.
The immigration official stamping you out might try and tell you that you do not have a re-entry permit out of courtesy, but tell them you understand. Or they may say nothing at all.
If you time your exit with the work permit cancellation you won't have to go to immigration and pay 1,900 baht either.