Hey I was out today and we have the no swimming flags up that signify where the surf zone is. The current was strong, but the lifegaurd constantly kept calling me back in because I was very close to the flag that ends the surfing beach. I never once moved into the swimming zone or came close to injuring anyone, but after 2 times he said it is my last warning and if I do it again he was going to escort me off the beach?

Is he aloud to do that? I'm in public water and on a public beach and not harming anyone.
We always have problems with our lifeguards on the surf beach for some reason.
I understand they are there for the safety of everyone and only enforce the rules and not make them, but I feel like some of them are almost " taking advantage " of being the "big guys" out there.