My first quesion is how old are you and have you ever tried tampons? Periods don't usually last more then 4-5 days. You should be fine my then. Try using tampons, you will be able to swim the whole time you are on your period.
It's perfectly fine to swim while you're on your period. Just wear a tampon as pads tend to not stick when you swim in them.