Yes dear it is right.Well I can serach the reference but from what I hear from scoholars is that...death comes any moment.So if a person think that he has committed sin-small or big,must quickly perform the salah taubah even if it is at the forbidden....
3 – The time for the prayer of repentance
It is mustahabb to offer this prayer when the Muslim has decided to repent from the sin that he has committed, whether this repentance comes immediately after committing the sin or later on. The sinner must hasten to repent but if he delays it, it will still be accepted, because repentance is accepted so long as one of the following impediments does not occur:
(i) When the soul reaches the throat (at death). The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Allaah will accept the repentance of His slave so long as the death rattle has not yet begun.” Classed as hasan by al-Albaani in Saheeh al-Tirmidhi (3537).
(ii) When the sun rises from the west. The Prophet (peace and blessings of Allaah be upon him) said: “Whoever repents before the sun rises from the west, Allaah will accept his repentance.” Narrated by Muslim (2703).
This prayer is prescribed at all times including times when prayer is disallowed (such as after ‘Asr prayer), because it is one of the prayers that are done for a reason, so it is prescribed when the reason for it is present.
Shaykh al-Islam Ibn Taymiyah said: Prayers which are done for a reason, such as the prostration of recitation, greeting the mosque, the eclipse prayer, prayer immediately after purifying oneself, as mentioned in the hadeeth of Bilaal, and istikhaarah prayer should not be delayed if the reason comes up at a time when prayer is disallowed, because delaying them may cause one to miss them, such as if the one who is praying istikhaarah may miss the thing concerning which he is seeking guidance if he delays the prayer. The same applies to the prayer of repentance. If a person commits a sin, then it is obligatory to repent straight away, and it is recommended for him to pray two rak’ahs, then repent, as it says in the hadeeth of Abu Bakr al-Siddeeq. End quote from Majmoo’ al-Fataawa (23/215).
source