Can I use a SRAM 10-speed cassette on my Shimano 105 9 speed groupset?
If you had 9 speed on both the wheel and trainer, or both 10 speed, then it would likely work fine.
However you have once of each, and that won't work well together.  There may be one or two cogs on the 10 speed cassette that line up with a 9 speed position on the rear derailleur.
Your best option is to buy another 9 speed cassette and keep the whole lot 9 speed.