"UK law permits your employer to refuse your resignation and make you stay if you’re doing something important"
Where do you people come up with crap like this?
If you are on a fixed-term contract without a notice provision, your employer can sue you if you walk out before you have finished your fixed term. Obviously, if there is a break / notice clause in the contract, you simply have to follow that.
For permanent employment, your terms and conditions should spell out the minimum notice you must give. No firm can force you to work beyond your agreed notice period as specified in your employment contract.
It may feel like it sometimes, but last I checked we'd outlawed slavery.