Consider control volume around the whole apparatus, and apply the momentum balance using the steady-state Euler's equations in the integral form:
$$\vec{F}_{body} = \oint_S(\rho\vec{V} \cdot d\vec{S})\vec{V} + \oint_Spd\vec{S}$$
If the nozzle is aimed parallel to the ground, then it simplifies to the 1D thrust equation, noting that the exit pressure is equal to the ambient pressure ($p_{atm}$):
$$T = \rho V^2 A_e \tag{1}$$
where $T$ is thrust, $\rho$ is the density of the flow right before the nozzle exit, $V$ is its exit speed, and $A_e$ is the nozzle frontal area.
We are going to assume there is zero loss in this whole endeavour, so the flow is isentropic everywhere, which means we can apply Bernoulli's to derive the exit speed (noting that inside the tank, the fluid velocity is zero, assuming the nozzle is small compared to the total volume):
$$V=\sqrt{\frac{2(p-p_{atm})}{\rho}} \tag{2}$$
where $p$ is the pressure of the fluid inside the tank.
Now substitute (2) into (1), simplify, and we have 1:
$$T=2(p-p_{atm})A_e=Q\sqrt{2\rho(p-p_{atm})} \tag{3}$$
where $Q=VA_e$ is the volumetric flow rate.
So the thrust is independent of what kind of fluid you use! However, it should be cautioned that this does not mean that a compressed air rocket will receive the same $\Delta V$ as the water one when their tanks are emptied. More factors, such as empty weight and tank volume, must be taken into account. For instance, the water rocket will have much lower volumetric flow rate than the air one, giving it a longer "burn" time.
1 Note the conclusion reached is identical to @sanchises' answer, despite the slightly different approaches.