When you are an NRI, you are obviously a resident of another country for tax purposes. And in most cases, countries levy tax on residents on their global income. So it may happen that as per provisions of the Indian Income Tax laws, tax will be deducted at source on income earned in India, as is in the case of rent. But at the same time, that income will be subject to tax in your country of residence. In such cases, we need to refer to the Double Taxation Avoidance Agreements that India has entered into with various countries.
The India-US DTAA for instance provides that rent from immovable property will be taxed in the country in which the property is situated. So NRIs who are residents of US would have to pay tax on rental income in India. While they would still have to declare that income while filing their tax returns in the US, they would get a credit for taxes paid in India.
It is prudent to check the tax laws of the country that you are resident of or consult an expert in that country.