My friend's phone died with no signs of life, the repairs shop diagnosed it to have it's ram chip failed and they say that all the data will be lost after repair.
Does it need to have its ROM reflashed after the ram chip replacement?
All the data will likely be lost, in fact, the phone will likely even have a new IMEI after the repair. The exception would be any data on an SD card as long as it is not adopted as internal storage.
These individual components, such as RAM, storage, radios, etc, are generally not replaceable even in an authorized factory repair facility. The standard practice for this "repair" would be to replace the mainboard of the phone. This action is similar to replacing a motherboard in a laptop, when it is done it is essentially a new device in the same original shell. Any data or information currently on the existing device will be lost as the "guts" will be replaced with new.