For many years, I have used 'Armohib' which I add in small amounts to hydrochloric acid . Ii is a dark brown gunge, but with this added the acid will eat away at rust, bur stop when the bare metal is reached. Not sure what the chemistry is, but it leaves a greyish film, that smells a bit 'eggy'
It was used in the lab of a firm I used to work for. They used it to clean steel plates, that were suspended in the water of sewage-treatment plants. I believe that by weighing the plates ,before and after exposure, ,and cleaning with the inhibited acid, they could work out the oxygen content of the treated water