Not at all
The phone contract doesn't embody the handset itself, only the rate, data, messaging plans. Also the usage of what the plan embodies.
The only thing you could risk is the phone warranty if you brick the device while trying to root it or load a new custom ROM but that is inconsequential since you bought the phone second hand and the warranty info wasn't disclosed. Although, you could go to a Sprint store and give them the ESN on the phone and they could tell you the warranty status on it. But either way you have nothing to lose and everything to gain by rooting your phone.