Basically, one can pray wherever it is clean. However, we should try to find a place that is relatively quiet and where people will not trip over us or be annoyed. And for a woman, the place should be away from others or somehow screened to protect the woman’s modesty when she bows or prostrates.

Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states the following: It is true that we must pray when the time arrives wherever we are, so long as we can fulfill the conditions for prayer as much as possible. One of these conditions is that our body, clothes, and the place where we pray should be clean and free from filth and impurity.

As long as you can fulfill these conditions as much as possible, you can pray in any place. That is the general rule.
However, the Prophet (peace and blessings be upon him) in certain traditions has warned us against praying in places that are especially filthy and distractive, while he also said, “The entire earth has been appointed as a mosque for me.”
So exercise your common sense, and pray without delay as long as you can fulfill the above conditions and isolate yourself from prayer as much as possible. After all, prayer is essentially an intimate communion with Allah.