If, for example, Gandalf went full Maia, took the Ring and dumped it into Mount Doom before anyone, even Sauron, could stop him—what would happen?
Depending on exactly what you mean by "rules", the answer is probably either "not actually possible" or "bad bad bad very bad things."
Can Gandalf shed his physical form?
This seems to be the assumption underpinning the question; if Gandalf could just dump his meatsuit and fly over to Mount Doom, the story should be over inside an hour, right?
Well, right, but that's a mighty big "if." Although Gandalf has a large amount of native power (larger than most casual readers would have you admit), there's no indication that he can arbitrarily shed his physical form. Although regular maiar are capable of self-incarnation (i.e. choosing a body like we choose a nice outfit), the Istari appear to be different; there appears to be a real, tangible connection between an Istari and their body, much closer to an incarnate than an Ainur.
We can see this quite clearly in at least three distinct ways:
They don't retain all their knowledge. We're told this in Unfinished Tales:
[I]t is said indeed that being embodied the Istari had needs to learn much anew by slow experience, and though they knew whence they came the memory of the Blessed Realm was to them a vision from afar off, for which (so long as they remained true to their mission) they yearned exceedingly.
Unfinished Tales Part IV Chapter 2: "The Istari"
This isn't a problem we see with any other self-incarnated Ainur-spirit; Melian, for instance, who was so incarnate that she had a child, retained what appears to be all of her knowledge. In particular, she demonstrates impressive prophetic abilities, as we are told explicitly:
Melian had much foresight, after the manner of the Maiar
The Silmarillion III Quenta Silmarillion Chapter 10: "Of the Sindar"
If they can, there's no reason for a rogue Istari to not do so. This is essentially what BMWurm points out in a comment on the question:
If they could really do that, I doubt Saruman would have gone down as easily as he did (before Gandalf broke his staff at least).
There's nothing to disincentivize Saruman from going "full maia," especially not once he's outed himself as being in league with Sauron, and especially especially once it becomes clear that he's losing.
Death actually has an effect on them. If the Istari were self-incarnated, then "death" (that is, the destruction of their physical bodies) shouldn't bother them in the slightest. This is what happens to Sauron in the Second Age1: he loses the ability to take on a particular form, but isn't otherwise restricted in his power, and can later self-incarnate again.
However, things are different when an Istari dies. When Gandalf dies, it takes the intervention of a higher power to bring him back; when Saruman dies, his impotent spirit is dispersed by a strong breeze (emphasis mine):
To the dismay of those that stood by, about the body of Saruman a grey mist gathered, and rising slowly to a great height like smoke from a fire, as a pale shrouded figure it loomed over the Hill. For a moment it wavered, looking to the West; but out of the West came a cold wind, and it bent away, and with a sigh dissolved into nothing.
Return of the King Book VI Chapter 8: "The Scouring of the Shire"
As it stands, I'm unconvinced that it's possible for Gandalf (or any other Istar) to break the Rules in his regard.
What about some of the other commandments?
We're only told of two explicit commandments the Istari are bound by; they're not to reveal themselves in their full power, and they're not to defeat Sauron by imposing their wills:
[The Valar's] emissaries were forbidden to reveal themselves in forms of majesty, or to seek to rule the wills of Men and Elves by open display of power
Unfinished Tales Part IV Chapter 2: "The Istari"
What "forms of majesty" exactly means isn't entirely clear; in one interpretation it would seem to refute my theory above, that the Istari physically cannot shed their physical bodies. Another interpretation notes that Gandalf is able to manipulate his appearance by expending power, which is supported by a comment made in Letter 156, written at about the same time as the essay on the Istari (emphasis mine):
When [Gandalf] speaks he commands attention; the old Gandalf could not have dealt so with Theoden, nor with Saruman. He is still under the obligation of concealing his power and teaching rather than forcing or dominating wills
The Letters of J.R.R. Tolkien 156: To Robert Murray, SJ (draft). November 1954
So, okay; let's work with that. Fortunately, it's a pretty short discussion (emphasis mine):
[Gandalf's] function as a 'wizard' is an angelos or messenger from the Valar or Rulers: to assist the rational creatures of Middle-earth to resist Sauron, a power too great for them unaided. But since in the view of this tale & mythology Power – when it dominates or seeks to dominate other wills and minds (except by the assent of their reason) – is evil, these 'wizards' were incarnated in the life-forms of Middle-earth, and so suffered the pains both of mind and body. They were also, for the same reason, thus involved in the peril of the incarnate: the possibility of 'fall', of sin, if you will. The chief form this would take with them would be impatience, leading to the desire to force others to their own good ends, and so inevitably at last to mere desire to make their own wills effective by any means.
The Letters of J.R.R. Tolkien 181: To Michael Straight (draft). January/February 1956
In Tolkien's mythology, the imposition of will by force leads inexorably to tyranny. This is, basically, what happened to both Morgoth and Sauron, and Saruman in the end; they both started off impatient, tried to usurp the natural authority of others, and became Dark Lords (or dark lords-in-training).
I'm forced to conclude that the same would happen here; if one of the Istari broke the Rules, they would supplant Sauron as the Dark Lord, and the cycle begins anew. I've discussed elsewhere on the site why that would be a Bad Thing; although that question is focused on Gandalf as owner of the Ring, the answer isn't limited to that scenario.
1 Though there's a bit of a false equivalence here; Sauron's powers are limited by the diffusion of his power into the Ring, which makes things a bit sticky.
It would be out of the question. Gandalf said how difficult it is to enter, let alone leave Sauron's domains.
I alone of you have ever been in the dungeons of the Dark Lord, and only in his older and lesser dwelling in Dol Guldur. Those who pass the gates of Barad-dûr do not return. [A Journey in the Dark]
In this case he was talking about the lesser of Sauron's two strongholds. Had Gandalf taken the Ring even he would be susceptible to its influence.
Frodo: "Will you not take the Ring?"
Gandalf: "No! With that power I should have power too great and terrible. And over me the Ring would gain a power still greater and more deadly. Do not tempt me! For I do not wish to become like the Dark Lord himself. Yet the way of the Ring to my heart is by pity, pity for weakness and the desire of strength to do good. Do not tempt me! I dare not take it, not even to keep it safe, unused. The wish to wield it would be too great for my strength. I shall have such need of it. Great perils lie before me. [The Shadow of the Past]
In the Letters of J.R.R. Tolkien he says of the difficulty destroying the Ring;
it was beyond the strength of any will (even his own) to injure it,cast it away, or neglect it. - 131
Aside from the Ring's temptations, there is as I mentioned the difficulty of getting to Barad-dûr itself. Elrond says,
The road must be trod, but it will be very hard. And neither strength nor wisdom will carry us far upon it. This quest must be attempted by the weak with as much hope as the strong. [The Council of Elrond]
Likewise, Gandalf tells Elrond,
in this matter it would well to trust rather to their friendship than to great wisdom. Even if you chose for us an elf-lord, such as Glorfindel, he could not storm the Dark Tower, nor open the road to the Fire by the power that is in him. [The Ring Goes South]
Sauron can no longer be defeated by strength. Even had Gandalf donned the Ring a personal encounter with Sauron would be frought with great difficulty because of "the true allegiance of the Ring to Sauron." [Letter 246] In the end the destruction of the Ring was not in the hands of those who tried to destroy it, but it got done thanks to Gollum even though neither he nor Frodo had the will to do so.