Lovelyboy - gentle hugs to you, and rest assured, you are not the first parent to run into this (or to be a bit taken aback either).
My difficult child discovered he was a boy at 3, and we had a couple years there where he felt free to play with himself anywhere, anytime, in front of anyone. To the point of rubbing himself raw. It's tricky discussing this on the board because people have varying opinions about morality, right/wrong, etc., and we have to teach our kids according to our own values. With my difficult child, I taught him that what he does in his bedroom is his business but that there are certain things we do *not* do in public. It took about 3 years, during which time I tried to keep an eye on him around peers. There were a few mortifying moments, but by age 6, that particular activity was relegated to privacy.
The number 1 issue is safety. Both for difficult child and for those around him. My difficult child got caught at around 8 playing "doctor" with- the neighbor girl, which pretty much brought an end to his unsupervised play time. Since you have concerns about appropriate behavior with- other kids, I think it's imperative to keep eyes on him when he's with other kids. It's a rough way to live, but again, safety is the key.
Fortunately, porn wasn't an issue at home. By the time he left for his first Residential Treatment Center (RTC), we had 1 computer which was in my bedroom which he did not have access to. Cable TV channels were locked. I think it's important to cut off access, any way you have to. Not a moral judgement, but in my humble opinion it's just simply inappropriate for children to view.
There were several more incidents over the years in RTCs. The explanation I received from professionals is that hypersexuality is not uncommon in bipolar kids. I still have a hard time wrapping my head around it in such a young kid, but... that's just me.
I think when you have a kid who has impulse control issues, it's going to be more of a problem.
We tried very hard to impress on him boundaries, privacy, respect for self/others. He was eyes-on supervision both at home and at Residential Treatment Center (RTC) for a very long time, not always successfully.
One thing we did, and to this day I'm not sure if it was the right choice or not, was that when he started asking questions about birds and bees at the ripe old age of 6, we answered truthfully and factually. No euphemisms, no hemming or hawing. My thinking was that since he was already so fixated, it would be better to just hit it head on with- facts and demystify it a little bit. My gut says that it was the right choice, but... who knows.
It's disconcerting and at times mortifying to have a kiddo who is openly hypersexual, but it's just something we have to deal with. Again (and again and again), safety has to be your #1 priority.