You could leave Thailand without cancelling your visa and work permit but this is not the correct way to do things and will cause you issues if you intend to work in Thailand again in the future.