As usual, the answer is "it depends".
If the rear derailleur is a 2nd generation 9spd derailleur, it will work perfectly. If it is a 1st generation 9spd derailleur, then it may not work as well.
10spd derailleurs had a different geometry than the original 9spd derailleurs, but as soon as 10spd was released, 9spd derailleurs adopted the 10spd geometry. 2nd generation 9spd derailleurs can be distinguished by the dome shape of the B knuckle: