Yeah, putting on the ring would draw the Eye towards him...it already had just a few minutes before. But at that point, the Black Riders were nowhere near and Frodo (at least in the book) decided it was worth the risk to protect his friends. And it would only be until he could slip away.