How to extinguish yourself in the Nether?
Solution 1:
Don't go to the Nether without a healthy stock of Fire Resistance Potions!
You're right that you can't extinguish yourself, as water can't be placed in the Nether, so you should always keep a stash of these things. Drink them in advance of fighting blazes, but always have a spare one in case you're accidentally on fire.
You can also up your survivability by enchanting some armour with Fire Protection, which will extinguish the flames faster, but not instantly.
Solution 2:
Water can be used in the nether. Kind of.
Placing a cauldron down, then placing a water bucket in it will allow water to be used to put oneself out, as stepping in the cauldron will remove a bit of water, putting you out.
Solution 3:
Get an enchanted apple. That will give you fire resistance among other things. That is the way to be safe in the nether without having to go there first to get the necessary potion ingredients.