You are a allowed to go out. But, beyond the yellow buoys you have to expect boat traffic. Wear a bright visible cap.
There two shore zones: the inner up to 150 meters from the shore where you can use floating devices and non registered dingy etc. In this zone motor boats are must travel perpendicular to the shore line and not faster than 10 km/.
The outer shore zone is 150 meters up to 300 meters from the shore. Here boats are allowed to cruise parallel to the shore but still not faster than 10 km/h. Just like on the road some people do not give damn about the speed limits.
If you intend to swim long distance alone (which is not a wise idea, as a cramp and the lack of salt in the water can make you disappear rather quickly) keep within the above mentioned distances. If you are accompanied by a boat the 150 to 300 meter zone would be perfect.
Swimming across the lake alone is pretty, pretty foolish. You might be hit by a recreational craft towing a water skier. In addition, did I tell you about the cramp and the lack of salt (less buoyancy)? Btw. Lake Zurich is up to 135 meters deep.
Nevertheless it is not forbidden to cross the lake. If you do so get a someone which can accompanying you with a boat. Be aware about the cruise line boats as they have the priority. A row boat is good enough (it has priority over regular motor boats, but must give way to sailing boats). If a group of ten or more person cross the lake you must inform the water police, in that case you can also rent rowing boats from them. It is a Weidling which is navigated using a stand-up rowing technique.
Last but least: If you see yellow buoys but no public bath then you will enter a nature protection zone. Keep away from that as well.
Btw: There are two water polices in Zurich. The one for the city of Zurich, and the one for the rest of the lake which belings to Canton Zurich.
Organised Events (most of them have been canceled for 2020):
https://www.swimsports.ch/de/schwimmkalender https://ch.srichinmoyraces.org/z%C3%...-marathon-swim