I wouldn't be overly concerned. And no, I wouldn't "talk to him". It doesn't mean he is gay. Kids do silly things. Talking to him will only make him feel badly, and for what? I remember some kid doing this decades ago when I was in seventh grade because he was the only kid at the time to reach maturity and wanted to demonstrate. He is happily married with a half dozen kids, a loving wife and a responsible job. This is a nothingburger.
Oh grow up, you ignorant dummy. Masterbating is not gay. I am very opinionated about boys - always thought even the youngest of boys were perverts but I'm going to give you some good advice. I promise.
You didn't say how old your son is, but young kids don't know what "all of that stuff down there" is or what it's for. They touch themselves just kind of figuring out what it is, the sometimes do it because it feels good. I'm talking about 3/4 yr olds. They don't know it's sexual. It's like rubbing your feet, it feels good. You have to tell them when they are young that those are special places and that they must not let anyone touch them there...and that they can't touch others there of course ( I taught my 4 yr old daughter because I'm deathly afraid of something happening to her - especially since she's a girl in this day and age. ) Also, if they are going to touch that place, they do it in their bedroom by themselves. You don't want them to think that those feelings are bad and dirty but you want them to know there is a place and time for it. They have to know that they can't run around pulling it out in the living room when guests are over. Again, this is for really young children, hopefully most people have taken care of this situation before their kids are 12. Hope this helps, just talk to him. Tell him it's not acceptable behavior - if he's older than 4/5.