Yes you can get worms and parasites from being in the ocean.
Swimming or wading in the ocean can also cause you to get sick in other ways but it's rare that a person gets a parasite or parasites or any other illnesses from being in the ocean but it is indeed possible.
Also walking barefoot on the beach can cause you to get parasites that could be in the contaminated sand on the beach that you cannot see.
Parasites can attach to your feet and then get into your skin through your feet and infect you.
So it's best to wear sandals on the beach and not walk barefoot although it feels good.
Yes it's possible to get parasites such as worms from walking barefoot on the beach.
The sand on the beach could be contaminated with some worms and other parasites that you cannot see and you might pick up the actual worm or the eggs and then they infect you.
When walking barefoot it's possible for parasites such as worms to enter your skin through your foot and then infect your body.
The parasites can also come out of your skin and come out of your foot.
So while it can feel good to walk barefoot on the beach in the sand it's best to wear some sandals when walking on the beach to prevent the possibility of getting worms and other parasites from the beach.
I used to walk barefoot on the beach but after I did get worms and parasites in my feet I started wearing sandals.
When I'm in my chair or on a towel on the beach then I will be barefoot but when walking on the sand on the beach I wear sandals.
There could also be broke glass in the sand that you might not see either although most beaches are free and clear of the glass or other trash.