Compare with the advice/requirement for pilots to follow TCAS RAs. I don't think TCAS discriminates between CAS and outside CAS, just to follow it.
So it is quite conceivable for aircraft (flying outside CAS)when following a TCAS alert to enter CAS as a result. (Indeed I am aware of at least two occasions when this has happened)
So yes, you did break a rule, but if you prove you were required so to do 'to avoid immediate danger' then I cannot see that this would ever be taken to court.