Yes—but only if he keeps moving. As long as Sonic maintains his speed, he can stay on the surface, but the moment he stops, he'll drop right into the water.
It also depends on the specific game, since not every Sonic title handles water the same way.