its so hard when you feel like you have to protect your children from harm even during something as seemingly innocent as a sleepover. It sounds like you are handling this very well, at least in terms of the choices you are making for your son (how you are feeling on the inside may be another matter!). As I am sure you read, many children your son's age experiment with their bodies. They do so among same sex peers as well, generally because they have more time unsupervised with same gender peers. However, the behavior you described does indeed go beyond the typical exploration. It is not typical for children to invent such sophisticated sexual acts, so it would seem that the boy who 'taught' these behaviors to your son may have been exposed to overstimulating situations (such as watching or looking at pornography) or sexual abuse. Kids do not understand the potential consequences of passing along such activities. It is my hope that child protective services have been notified about the child who exposed your son to these behaviors. Reporting suspicions of abuse is an important duty we all have. You may want to sit down and explain the situation to the parents of the child your son 'taught the game' so that they can monitor their own child as well.
I agree with you that this occurrence does not necessarily have to be a traumatic incidence in your son's life. It is not likely to change his sexual orientation or create a desire to abuse or harm other children. I would be concerned if your son started exploiting younger or weaker children or using coercion to get peers to 'play the game.' However, it seems from your description that your son was rather innocently passing along some exciting new discovery to a friend, just as he probably would show him a new video game or magic trick. In which case, you handled it very well. I like that you offered to take him to see someone, but did not push it when your son said he did not want to go. It may help you and your husband to go see a psychologist if you are having difficulty dealing with what has happened.
Here's some things you may wish to do for the near future: provide more supervision during play with peers, if there is a sleep over--have the door open and walk by frequently, monitor your son when he is at events with other children (like a holiday party where the adults are in a separate area from the kids). You don't have to start being suspicious of his every move, just keep an eye on it to make sure he is not tempted to pass this behavior along to another child. Such experimentation is much more likely to happen if kids know they are unlikely to be disturbed by an adult. Just avoid giving the kids that level of privacy for a few months. Remember that kids are always better at promising to refrain from an activity than they are about actually reigning in their impulses 'in the moment.' If your son asks about your increasing the supervision or complains, let him know that you are keeping him safe, and that sometimes the things adults have to do to keep kids safe are not much fun.
Here are some signs to look for if you need to be concerned about your son's emotional well being in the future: sudden strange fears, school refusal, changes in eating or sleeping (particularly nightmares), ongoing precocious sexual behavior (such as touching himself compulsively or doing so in front of others), loss of interest in previously enjoyed activities (for example, if all of a sudden he refuses to go on a boy scout trip he had been looking forward to), mood swings or unexplained somatic complaints. All of these could be indicators of a child under stress. If you observe such changes in your son, it would be a good ideas to ask your pediatrician for a referral to a psychologist.
Disclaimer: This post was written for informational purposes only. It is never intended to replace face to face psychological or medical care. This post is not intended to create a clinician-patient relationship, nor to give or rule-out a diagnosis.