In an ideal world you would try to hold off on getting your hair wet except for days when you are planning (or might plan to) wash your locks anyway so they aren’t getting wet an excessive number of times. (That is you go swimming, and then go rinse/wash your hair afterwards right away.)
Washing after swimming in the ocean isn’t quite so “bad” as pool water as you can get a way without washing afterwards if need be, but we do recommend washing after swimming in any water just to be safe. And if swimming in FRESH water (pond and lakes especially) that you do a THOROUGH deep cleanse afterwards as fresh water tends to have a LOT of bacteria in it that can lead to odd-smelling dreads.
Some folks even find that salty ocean water has a tendency to even help the locking process. This is due to the drying nature of salt which roughs up the hair and encourages tangling. (Certainly you’ve experienced this with “normal” hair already!) So if you’re going on vacation for a few weeks or even a month and planning to go surfing or swimming in the ocean a lot, you may even find it to be beneficial. However, you want to make sure that you get your locks good and VERY dry down to the core after each dip. And, finally, although it may be helpful long term, we do NOT recommend using salt water like this in the long term as it can make the hair excessively dry and leave you susceptible to damage and breakage and dreadlocks are only as strong as the hair with which they are composed!