Can patella tendon pain in a knee replacement be an indication that the tendon may rupture? And will ice or heat be more beneficial

Not gonna rupture. Patellar tendon pain is not a sign that it's going to rupture. However ice the better option for helping reduce pain from patella tendinitis. I would consider also taking some oral anti-inflammatories and get physical therapy to help with this which is most effective. Your final choice to consider is platelets rich plasma injections into the patella tendon. Good luck and see your surgeon.
Not likely. It is rare to see a tendon rupture after a knee replacement. There is a lot of remodeling that occurs after replacement surgery. Stretching and strengthening exercises help the tendon remodel and heal after surgery. Ask your surgeon and therapist if there is anything specific you can do to help it improve.