My daughter who's 9 fits just fine on a 26" MTB with a smaller frame made for young riders (the geometry is a bit different than a 26" MTB made for adults). Not really made for genuine offroading.
I actually borrowed her bike a few times around town, and it can sort of fit me, too (I'd need a bit longer stem to be really comfortable, and I have to of course raise the seat way up, but it sort of fits), so she should be fine with it growing up. 20"-24" bikes can't keep up so well as they grow.