Acid resistance will protect you against acid damage, which is, however, rarely encountered and which does little damage. It does not protect your equipment against acid – you can do that by corrodeproofing it.
Acid resistance cannot be obtained by eating corpses. You can get it by wearing yellow dragon scale mail (or scales), or an alchemy smock. You could also polymorph into a monster that has intrinsic acid resistance.
In SLASH'EM, the alchemy smock has been replaced by the lab coat, which also provides this extrinsic. Acid resistance is still not usually considered necessary for ascension, but some new monsters in SLASH'EM, most notoriously the giant shoggoth, deal massive amounts of acid damage and therefore a player who has magic resistance, reflection, drain resistance, and magic cancellation through other means may opt for yellow dragon scale mail just to be on the safe side.