There is a difference between the 9.1/9.2 upgrade CDs and an actual full 9 installer CD.
Also, Mac OS X shouldn't need Mac OS 9 to be installed (I didn't have Mac OS 9 on my system when I installed Mac OS X, it didn't have anything on it at the time). Your system (an older iMac) may need a firmware update (which is included with the full Mac OS 9 installer CD), but once upgraded, Mac OS 8.6 won't be able to boot that system again.
To move from 8.6 to 9.x you'll need the full install CD of some version of Mac OS 9. To use Mac OS 9 as Classic you'll need to upgrade to 9.1 or 9.2 (both can be downloaded but you have to have 9.x first). There is no free way to legally upgrade Mac OS 8.6 to Mac OS 9.x, but moving from 9.0 up to 9.2.2 just requires a internet connection and a few downloads. It should also be noted that installer CDs that came with other systems may not be able to be installed on any other system other than the one they came with. These are hardware specific CDs for those systems that Apple made to keep people from giving out copies to owners of older systems. Plus the possible firmware update that you would need would not be on a hardware specific installer CD for a newer system.
Getting Mac OS 9 shouldn't be to much of a problem though, as I recall many places are still selling it.