Yes, you absolutely may gloat. Any time you feel like you deserve the chance to gloat, you may gloat. However, before gloating, there are a few things to consider first.
1) We, and indeed even you, refer to ourselves as a "community"; a collective of people that work together with the intention of benefiting everyone. Gloating is more of a retaliatory action done in response to a perceived injury and does not benefit anyone except the gloating party. In fact, it often harms the rest, which makes it decidedly against the spirit of a "community". Given that, don't be surprised if you alienate a significant portion of the community when you gloat. This can be bad for even yourself. As John Donne said, "No man is an island, entire of itself"; you benefit more when aided by others. Others aid you when they feel you are deserving of it. Alienating them makes them less willing to help you. So what good comes from gloating?
2) As I said at the beginning, you may gloat whenever you want. However, consider that others may ignore you, delete your comments, shun you, or pay close attention to your every deed and start calling you out whenever you are wrong about something. And since practically all people on Earth are wrong more often than right, this may not be a good thing.
3) Some people claim they gloat as a way of teaching others not to repeat a failure. There are far better ways to do this than gloating. Gloating breeds resentment. A more sound strategy would be to thank the community for correcting the mistake. For example:
Yeah, thanks everyone for correcting the mistake. This whole time I couldn't see how I was wrong about it and I was starting to think I'm crazy. Good to know it wasn't me. I guess from now on we'll have to keep our eyes open so we don't make this kind of mistake again.
That shows gratitude, you equalize everyone by implying you could have as easily been mistaken (so nobody feels like they're less than anyone else), then you end by including yourself in the community ("we'll") and expressing hope for collective improvement. This kind of response is more likely to result in learning from mistakes than a gloat. Gloats make people resistant to adopt the gloater's point of view.
4) If you do decide to gloat, NEVER gloat before winning (e.g. being shown to be right, or having a question re-opened). This is a bad idea. All you will do is make it less likely that whatever you are gloating about will come to pass. If what you're gloating about relies on the decisions of the community, then making the community resentful seems like a bad idea. Counting your chickens before they hatch might also be shooting yourself in the foot. This point should be obvious. Plus you don't want to risk what you're gloating about not coming to pass.
In short, we will never say that you are forbidden from gloating; however, gloating is a short-sighted action. It provides immediate gratification at the expense of others and, in the long run, it almost invariably is worse for the person who gloats. It is a sign of being what some might call a "sore winner" and shows that a person acts more on immediate feelings than a rational assessment of their situation and future. So, like I've said, you can gloat and I won't stop you (nor will the rest of the community, if they don't mind my speaking for them), but why would you want to gloat?