There is always a small voltage difference between different metals when they are in tight contact such as welding even if there is no solvent. Not only that but the voltage depends on temperature which is the principle behind thermocouples, but the voltage results in only very tiny amperage and requires amplification for thermometer use. This is used in electroplating as for example if you want a good result on chrome plating you have to polish the surface first and then plate a layer of Cu, then a layer of Ni and finally the top layer of Cr. The idea is that Cu will give electrons to Ni and the Ni will give electrons to the Cr so that the Cr will not become Cr+3 ions and gradually combine with oxygen to form an oxide and most corrosion of any metal in air is likely an oxide since Oxygen is the second most reactive element, being only less reactive than F. Hey our atmosphere is a pretty vicious place and maybe you recall that gasoline is not free but the oxygen required for combustion is free and readily available? Field-Effect-Transistors are also indirectly dependent on voltage differences between layers of different metals relative to a substrate like Si or Ge. Thus a liquid solvent is not necessary for a electromotive voltage as long as the different metals are are in direct contact. As far as rust inhibotors go passive layers of electroplating are the simplest examples so ordinary Cr plating is a common corrosion inhibitor. It is not obvious that the Cu/Ni/Cr layers prevent/slow corrosion but this has been established for the best Cr plating.

Don Shillady
Retired Scientist/teen rodder