No. Spec Ops connects to Activision servers even in private mode. Using a trainer there will trigger a ban for both players.
Recommendation
A trainer is an external program that modifies game values in real-time, offering "cheats" like infinite health or ammo. However, because Modern Warfare II (2022) uses advanced anti-cheat systems and requires a persistent internet connection even for single-player, using these tools requires caution. Understanding Modern Warfare II (2022) Trainers call of duty modern warfare 2 2022 trainer updated