Can old passenger airplanes be refitted with latest engines to extend their life and efficiency?
You are absolutely right - refitting new engines to older airplanes makes a lot of economical sense. After all, two thirds of fuel economy gains in the last 50 years were due to better engines.

However, some conditions conspire to make this harder than it might look:


The better efficiency was gained by increasing the bypass ratio of engines, which means that the new ones had more diameter for the same thrust. This makes them hard to fit to airframes designed for the smaller engines, and adding a longer landing gear would be too expensive - then it is indeed better to buy a new airframe.
Designs with tail-mounted engines would have center-of-gravity problems with newer, heavier engines. Tail-mounting engines was very popular after the Sud Aviation Caravelle pioneered this, but rules out those designs (BAC One-Eleven, Vickers VC-10, Boeing 727, Illyushin 62, DC-9, Tupolev 134 and 154) for refitting with more modern engines.


Add to this that airframes have a limited life time, and fitting new engines makes sense for only a limited number of aircraft.