I'm a high schooler from Chicago with some sort of General American accent. Tapped realization of the /t/ and /d/ phonemes in the positions you mentioned is extremely common in American English. However, I don't think it is common at all outside North America, but there may be some accent of which I'm unaware that uses the tap. However, tapping (also called flapping) is a key feature of General American English. Use of a plosive in these circumstances in an American accent sounds gratuitously formal and somewhat nonstandard to my ears, but not necessarily wrong.
However, there are many exceptions and variations. I think the t-vowel-n combinations are pretty well known as a special case. They are commonly realized as [ʔn̩], sans tap, even following a vowel. However, this is not universal. At school, I once heard a student pronounce "Newton" with a final syllable of [ɾɪn] and then heard another student pronounce "Britain" ending with [tʰɪn] (I'm not certain if he aspirated the plosive or not). This was noticeable to me since neither used the common pronunciation that I usually use, [ʔn̩].
On the other hand, there are cases in which the tap is used that do not follow a vowel. For example, I pronounce "forty" as something like [ˈfɔɹ̈ɾi]. Thus, I think the rule you mentioned may also apply when following a rhotic approximant. There may be even more situations in which the tap is used, but I cannot think of them currently.