Do not attempt to use a trainer in online multiplayer.
You need a clean install of Red Alert 2 v1.006. If you have the Origin/EA App version, it is already patched differently. You are better off installing from the original CD-ROMs or a no-CD cracked 1.006 patch.
Trainers work by injecting code into another program. Because of this behavior, antivirus software often flags them as malicious (specifically as a "Trojan" or "PUP" - Potentially Unwanted Program).
Because you are trying to get 20+ year old cheat software to work on modern hardware, issues are inevitable.