If you can get it flexible and oiled it will be 'okay' for a while. But how long depends on how deep the corrosion ate into the metal. I usually only do what you're doing instead of replacing when I know the person getting the bike won't appreciate it or take care of it anyway. Otherwise, for the cost of a chain I'd replace it. I'm assuming this is a single speed or under 8 speed bike. Good luck,