If I rent an apartment, can I still buy one?

Absolutely! Although you’ll probably need to obtain your landlord’s consent first.