Yes you can upgrade segments of a trip only.
Officially you have to fly all segments, but am not aware of the penalty actually being imposed. In the end you did pay for it already. You can always call them and let them know your plans changed and you will not take the last leg.