The formalism developed by Jain and Kundu for the propagation of a resonance in the nuclear medium has been modified to the case of heavyion collisions at relativistic energies. The formalism includes coherently the contribution to the observed di-lepton production from the decay of the resonance inside as well as outside the nuclear medium. The calculated results are presented for the ρ-meson production. It is observed that, in general, the shape, magnitude and peak position of the coherently summed invariant mass distribution is much different from that obtained by summing the inside and outside contributions incoherently. Therefore, while inferring the modification of hadron properties produced in heavy-ion collisions from experiments, it is important that in theoretical calculations one includes the decay of the propagating hadron from inside and outside the heavy-ion system coherently. We also find that the mass distribution is sensitive to the amount of the medium modification of the ρ-meson.