Hello
Yes it is necessary to erase the associated sector before re-programming locations that are already programmed.
It is necessary that each D-FLASH word is in the erased state before being programmed.
If a location needs to be updated with a new value, then it must be erased first.
The smallest range of the D-FLASH that can be erased is a sector, which means that to update a single word, then the RAM copy and update method you described is correct.
If the application allows, the reprogramming can wait until multiple words in the RAM copy have been updated, to reduce the program/erase overhead.
Alternatively if the application has spare D-FLASH locations then multiple locations can be used for a parameter that requires frequent updates. So following each erase the parameter is first programmed to location n, then location n+2, then n+4 etc.. This limits the erase cycles. You would need to track the current location in software.