Six Flags Hurricane Harbor accused a parkgoer of not being the master of his domain in its swimming pool and it was embarrassing as hell ... so he says in a new lawsuit.

Eric Anthony Guinea is suing the theme park for discrimination and emotional distress after it hurled the allegation back in June ... claiming he masturbated in front of kids in the pool.

In docs, obtained by TMZ, Guinea says a security guard ordered him out of the pool, telling him staff saw him pleasure himself in the pool next to little kids.

Guinea denied it ... saying he was playing with a rubber band he found in the pool while watching his 5-year-old daughter. Guinea says another security guard had the audacity to ask if he was a registered sex offender ... before laughing it off and then telling him to enjoy his day.

Guinea said the ordeal was humiliating, made all the worse because he says he was singled out since he's a 370-pound man adorned with tattoos and keloids all over his body.

We've reached out to Six Flags, so far no word back.