Only if it's rated 100m or higher. The movement type doesn't matter here, only the water resistance rating does.
A quartz watch isn't more water resistant than an automatic just because it runs on a battery. That's a common myth, but it's not how water resistance works.
Check the caseback or spec sheet for the actual rating. Then take it off before you swim if it doesn't clear 100m.