An Xbox Game Pass subscription is not necessary to play. Call of Duty: Warzone 2.0 falls under the free-to-play standards.
It's not on GamePass and it doesn't need Xbox Live Gold either. MW2 and its multiplayer component is not free. You need to buy it if you want to play the single player game or MW2 multiplayer. You should be able to delete the campaign if you don't want to buy it.