It is very possible for a young boy to be mistaken about being gay. Many (probably most) boys experiment with their friends before being attracted to girls. Those early years (11, 12, 13, maybe even up to 15) are a time of sharing sexual intimacy with best friends and even slight acquaintances.
Many boys are so horny at that age that they wonder about every boy they know-
Does he do it?
Does he do it with other guys?
Is there a chance he'll do it with me?
How can I find out?
At the same time, girls are still very mysterious and frightening to them.
My feeling is that a young straight boy may erroneously believe himself to be gay because his only experiences so far have been with other males.
When the hormones really kick in and he begins to be comfortable socializing with the other sex, he will see girls in a completely different way. And if he has made the "gay announcement" he will have a lot of backtracking to do.
A number of comments on this site have mentioned masturbation pals who suddenly discover the other side of the street and abandon their jacking buddies. That's normal for straight boys.
If it was up to me to counsel a boy (which it isn't, thank goodness) I would tell him to keep his mouth shut until his late teens.