Rare earths for materials corrosion protection