So what they are both really saying is no :-) ...at least not without chainging things.
If you have 9 speed (assume modern STI) and then install a 10 speed cassette you have 2 main issues.
1. You have no way of selecting all 10 gears as the sti levers only have 9 settings.
2. The chain will foul the casstte as the guage is different from your 9 speed chain.