Which Rim Size will Fit My MTB?
Just replacing the groupset is not enough. 9 speed cassette has different spacing from 6 speed, so the derailleur steps won't match the cogs. For 9 speed cassette, you'll need a new hub, and the new hub is wider than 6 speed so you need to spread the frame too.

There are many different 26&quot; sizes, none of which actually measures 26&quot;. For 26 x decimal inches, the correct one is 559mm

See above and What is the maximum or minimum tire width I can fit on my bicycle