He was wrong, and that is why he tore up the ticket, because he knew he was wrong. There is a doctrine called "necessity" that allows you to violate traffic laws, even murder someone, if it is necessary. It may not apply when you are rushing to the hospital to see someone, but it definitely applies to a situation where someone in need of emergency care is in your car and you are rushing to the hospital. Once the cop saw you in the truck in pain with a medical emergency, he could see that your friend had a good reason for speeding, and should have escorted you to the hospital, not delayed your treatment.
One thing further on that, if the person who suffered the injury was harmed even further by the cop’s need to issue a citation instead of provide rescue or other support the department could be sued for major cash.
I think you’re wrong, but you may not be.
When I got able to, I called my wife from the hospital, and she went to the police station that same day. The next day when I walked in, the chief looked up from his desk and when he saw me he said, G.D.!, I hope you aint as mad at me today as your wife was yesterday!!