You have a 10-speed shifter currently?
The "9-speed" MTB RDs are rated up to 34T, but the 36T should work fine, considering people have reported using 30T cassettes with 27T-max road RDs. You'll be right at the 45T chain wrap capacity, which is fine, but it would be best to size the chain based on the big/big + 1" method.
It's best practice to replace the chain with a new cassette. Save the old chain with the old cassette in case you have a use for it later.