My question is about the sound /t/ being pronounced more like [ts] in British accent. For example, The words like Tomato, Peter, water, task, Tom, talented, take the /t/ sound is definitely not pronounced as /t/ (it can, but this variation is 100% in place) but with [ts] sound after the /t/ sound. However, there are also several words that don’t actually follow the rule of it, like attach, toast, teach that these t sounds do not go for the rule of adding [ts] sound. The third category would be in the case of the words like task or tooth where either pronunciation is fine. I wanted to ask Is there is rule for it? Thx!
Affricated realization of /t/ is characteristic of (certain varieties of) London speech (Cockney). Wells (1982: 31) writes:
A common allophone of /t/ in a London accent is a heavily affricated [ts], thus [tsɑɪʔ ~ tsɑɪts] tight, [ˈpʰɑːtsi] party. To an American ear, as mentioned above, this evokes the stereotype of effeminacy, if the speaker is a man; but in London it has absolutely no such connotations, being quite ordinary.
The affrication is indeed noted to be a characteristic of stereotypical speech of gay men (Cameron & Kulick 2003: 90).
Wells continues (322–3):
[I]n broad Cockney at any rate – the degree of aspiration is typically greater than in RP, and may often also involve some degree of affrication.
Affrication may be encountered in initial, intervocalic, and final position. In the latter it is usually preglottalized, as [aʔpɸ] up, [ɑːʔtˢ] art, [ˈna˗θɪŋʔkˣ] nothing. Non-finally affrication of /p/ is rare, but examples for /t/ and, to some extent, /k/ abound, e.g. [tˢəi] tea, [kˣoʊ] call, [ˈbetˢəi] Betty (the latter differing from [ˈbetsəi] Betsy in having a shorter fricative element). Sometimes the voiced plosives, too, are affricated – particularly /d/, as [dᶻɪʔkˣ] Dick, [bædᶻ] bad.
Watson (2007) also reports /t/ affrication "is common word-initially" in Liverpool English.
As for the "rule" you mention, however, I've never heard of anything like it.