Yes, that's correct. If you compress a spring, tie the ends together, then dump it in acid, the potential energy stored in the spring will heat the acid as it dissolves.
This heating of the acid is another example of the conservation of energy. When you compress a spring, the molecules repel one-another more so than an uncompressed spring. So when the acid eats away at the spring, the molecules fly away at a higher speed. These moving molecules create heat in the acid as they collide with the acid's molecules.