It is legal, and it can remove Corrode markers.
The key point is that after the original armor falls off, but before the new armor has been placed, you check if your armor is negative. If it is, you lose Corrode markers until you have 0 armor. Then your armor gets added. If any Corrode markers fell off, you'll be at 1-2 armor at that point. It doesn't help if you have 2 Corrode markers, Rhino Hide, Leather Boots, Leather Gloves, and Dragonscale Hauberk though. Even without your Dragonscale Hauberk, you'll still have a positive Armor value.