Q. Can one give a Jewish name to an assimilated Jewish parent who didn’t have one, after his death and inscribe it on the matzeiva?

A. Although, Shulchan Aruch (Y.D. 263: 5 and 353: 6) writes that the minhag is to give a name to a neffel or stillborn baby before burial. Horav Shlomo Miller’s Shlit’a opinion is that it applies only to a deceased infant who never had any name given. This is done so he will be able to have an identity when he resurrects at thechias hamessim. However it is not done to an adult who never had a Jewish name.
On a similar case the Rov ruled, that as long as a moribund patient without a Jewish name is still alive, one can give him a name in shul and recite a misheberach and tehilim for his refuah shleima.
Then even if the dying patient did not survive thirty days, his Jewish name can be inscribed on the matzeiva.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a