You will only get matched with other cheaters as far as I know. Do not abuse trainer privileges in a mode your not supposed to use it on, it just makes the devs come up with stronger defenses and that means less trainers for everybody.
Yes, I'm fully aware of that, I just wanted to clarify that before using the trainer-
Will using the trainer in solo only restrict the matchmaking with legit players and instead matchmake me with other cheaters?
What about joining friends through invites/codes?
Yes, it can.