No, you couldn't buy anything really. There was tremendous housing shortage throughout all USSR existence, and the apartments were distributed. There were some building "cooperatives", but they were massively subsidized too, with the spots rationed and queued for many years ahead.
More like you could get on a list that would have you in another apartment eventually (if you lived that long). In practical terms it's no different from "affordable housing" in the US.