To some extent, yes, but sometimes the new stuff requires structural changes which are not easy to economically modify into existing airframes. For example, Tranche 1 Eurofighters are almost 'toxic waste' as they can't be upgraded and almost nobody wants them. Similarly, structural difference between Gripen A and C are pretty big and it takes an expensive rebuild to make A into C. Yet another example, although bit of a special case, is F-16 Block 60 where changes were so major that it would not have been possible to upgrade older F-16's to Block 60 standards.
I don't know what's the situation regarding JF-17, I am sure Block 1 & 2 can and will be upgraded to some degree at least but remains to be seen if it's possible or economical to go full monty Block 3.