What happens to my WhatsApp account if my carrier sells my number to someone else? I'm aware that I don't need a SIM card to continue using my WhatsApp account after the initial activation.

But say, hypothetically, I went into a pool with my phone inside my pocket and my SIM stopped working as a consequence, and I don't want to buy a new since I never use mobile data. 

When the carrier inevitably cancels my number and sells it to another person, and said person activates his WhatsApp account with that number, will I still be able to send and receive messages on my account?
Simple answer No you can't use that account anymore

Reason being that WhatsApp is linked to your number. If the carrier sells that number and new owner activates WhatsApp , they will be prompted to authenticate and a new account is created for them. If they don't install WhatsApp you are good to go to the next time Whatsapp asks for authentication

Actions to be taken for change of number before changing number are mentioned in WhatsApp FAQ