According to the NYT Ask Real estate column, the answer is maybe. You need to have a legitimate claim to the apartment. The advice is that if you have lived in the apartment for 2 years at the time that your relative leaves the apartment you will have a strong claim. If the person is elderly or disabled, you need to live there for one year.
From an investor or landlord perspective, I often get questions on apartments that seem to have a price of 1/2 or 1/3 of the market value and buyers inquire why. In my experience, this have been apartments sold with a rent stabilized tenant in place. If it’s a large enough apartment, it’s probably more feasible to see a relative moving in and sharing the space with the leasee for a period of time and then gaining succession rights keeping out of the owner’s hands for many years. However, if it’s a studio, it might not be worth the trouble for a relative to gain succession rights. These type of investments are risky and should only pursued if you can support them as typically the rent does not even cover the monthly charges.