In my experience, if you have persistent knee pain on a ride it isn't going away and to do the least amount of damage you should ditch the ride ASAP.
I'm dealing with some quad. tendinitis right now. The best thing to do is no cycling for a week and then slowly easy back into things, like very slowly and ice it if there is any sign of discomfort.