Well, there are different ways to go about things in life. Based on your OP, you already made up your mind about what you want and why, which leaves you with not a lot of options. Explaining your thought process would make it much easier to find solutions, other than the ones I already posted.
Think about the difference between carrying your firearm everywhere you go vs. being able to use it everywhere you go. A handgun in the cargo pocket of your swim trunks enclosed in some waterproof bag is pretty useless. How long does it take you to unpack that contraption when you need to draw your gun?
Instead of using such cumbersome setup, drawing from a waist pack is significantly simpler. If anyone asks about your waist pack, tell them it's medical equipment. Does that waist pack have to be waterproof? Not really. It may be more convenient tough.
Alternatively, you can just drop your waterproof requirement and carry the firearm using a standard pocket holster in the cargo pocket of your swim trunks.
Also, think about that you should go to the beach (or pool) with this setup already in place. Handling your firearm in public at the beach (or pool) is just asking for trouble.
PS: For those making jokes about carrying while swimming, realize that if you don't then the gun is either on the beach, where it may get stolen, or secured in the car, where it is even more useless.