Can this help against lava so that you don't burn and die or what can be used to stop a burn directly?
Armor pieces with the enchantments Protection and Fire Protection reduce damage from both lava and fire.
With fire resistance you can swim in lava.
The burning animation is still there, but you don't get any damage.
With healing potions you continue to lose life, so you need a lot more.
It makes it easier to survive
But it is best to always have a water bucket in your inventory.
Fire resistance to stop fire damage, healing to get extra HP
Just throw a throwable water bottle on the floor under you. Of course, it doesn't work in lava, you need fire resistance for that.
And if I dump the bucket of water, will I immediately stop burning and will iron armor protect against lava?
Yes, the fire stops immediately. Just don't put the water in lava, then obsidian or rubble stone will be created and the water will be gone
Iron armor alone does not protect against fire, only with a fire protection enchantment