I test drove a 97 Contour with the V6 this last week end and it did what you describe.
I would be driving and then let off the gas to cruise for a second or 2 as I approached a car then the tranny shifted hard and made the clunk sound when I pressed the gas pedal.
If I drove normally, it seemed fine until I let off the gas and press the gas pedal again while in motion.
Car had 117K miles on it. Engine was strong though.