Yes you can be allergic to the ocean and if you are allergic to the ocean and go swimming in the ocean then you can develop what's known as swimmers itch.
The ocean water is salty water and not fresh water like you would have in a swimming pool and it's also not like the water that is in lakes.
So you might be able to swim in a lake or swimming pool or pond and be okay.
But then you might be allergic to the salty ocean water.
You may develop rashes or burning sensation on the skin.
If you're allergic to ocean water then you should not swim in the ocean.
If you get a skin rash from swimming in the ocean you may also have an allergic reaction to certain microscopic parasites that infect some birds and mammals.
Those parasites are released into the ocean water by snails that are infected with the parasites.