In Kanto, it's possible to get Surf on your third badge, but it's not *an obstacle to further progress* until you have 6 and need to get to Cinnabar Island.
In Johto, you can't fight Jasmine until you've been to Cianwood which of course requires crossing water, and you can't fight Pryce until you've surfed out to the red Gyarados and cleared out the Rocket Hideout quest.