I've heard it many times that the IMF forbids its members from pegging their currencies to gold
I don't really know if they really claim what they are ascribed to claim but even if so it is not what is going to stop China from pegging its currency to gold. Gold is a highly volatile asset on its own, and its volatility doesn't depend on how well (oh how bad, for that matter) a specific economy fares (which has chosen to peg its currency to gold). Thus, if some country pegged their fiat to gold, that would most certainly create total chaos in the economy once the gold value (price) starts to thrash about as a headless chicken. I think that's the primary reason why the IMF has set this rule.
Gold is volatile only because no big national currency has been pegged to it for the last 4 decades, and because the powers that be have been manipulating its 'market' price. If and when a major national currency is pegged to it, it will have nowhere to go but up from this level.
The IMF exists to enforce the imperial system --it has been amply documented that it doesn't operate with the best interest of developing countries in mind, to put it mildly. And the imperial system would be profoundly threatened by any major pegging to gold.
Apart from that, why would China ever want to destroy the dollar if that would inexorably destroy the market for their exports?
Certainly, the elites in China and every other major country want to maintain the status quo for as long as possible, since it benefits them too. But they also understand the fundamentally unstable nature of a dollar-based system, that benefits the imperial center at their expense. They thus have a dilemma, and who knows, at some point they might want to bite the bullet and free themselves from the dollar.
When China stabilizes its system through devaluation and/or pegging, it will have a lot of freedom to apply stimulus to dull whatever pain might come from the change. In fact, capital and demand from around the world will be attracted to a China with a currency that is both stable and initially cheap, further limiting the downside, and improving the upside.
The mainstream press never mentions that devaluation plus inflation (with or without pegging to something other than the dollar) is the perfect solution for the vast majority of countries' financial instability problem, the vast majority of the time. For example, Greece should get out of the euro, devalue, and wipe out most of its debt, for its own good. But if countries were 'allowed' to do this, it would be a big threat to the dollar-based imperial system, in multiple ways.
I don't know about you, but personally, I don't see any real sense behind this idea. Especially when in reality they are hell-bent on devaluing their own currency against the same dollar (obviously, trying to keep balance between devaluation and runaway inflation which such devaluation is prone to cause)
Of course China wants to devalue massively, and then regain stability at the new exchange rate. See above. The only reason it has not done so is that it's not allowed to, while it still wants to play along with the imperial system, more or less.
But pegging to a non-dollar asset is not incompatible with devaluation, at least initially. If an ounce of gold is worth 8500 yuan today, China could peg to gold at, for example, 85,000 yuan per ounce, and assuming thisprice level has been properly arrived at, the yuan would immediately be much cheaper in dollar terms, but also regain stability at that level, and will have nowhere to move but up. As for the US, it would be up sh*t's creek.
As I always say, it's a mistake to think we have this monetary and financial system mainly because of economics and finance. Those are big factors, but politics is the real long-term driver.