When you say "wheel" I'm assuming you mean a car sized wheel. In their finished form I wouldn't be concerned. Magnesium swarf and filings will quite readily burn but the heat required to burn a solid lump like a wheel would be pretty substantial and therefore unlikely unless you have a fire surrounding it. But okay, lets say you did have a fire surrounding a magnesium wheel so that it would burn - the wheel rolls away from the fire and stops, giving you a pure metal fire. Will a class D extinguisher suffice? Very unlikely in my opinion. A magnesium wheel would more than likely be a larger sized wheel off a sports car so probably around 18" in diameter. That's a big amount of magnesium to attack with a class D extinguisher. Class D extinguishers don't carry a fire rating to tell you what size of fire can be extinguished but any videos I've seen of class D extinguishers in action need to use a lot of extinguishing media to put out a fairly small amount of burning metal. Think of a cereal bowl size.
If the fire cannot be left to burn out, then I would more likely consider sand (and lots of it) as a more cost effective and readily available solution.