Chemical equilibrium may involve reactions that produce or consume the solvent. However, changes in concentration of solvents are usually insignificant, therefore it is effectively a constant. Consequently, the concentration of the solvent is excluded from the equilibrium expression.
The reaction which you had mentioned is carried out in an organic solvent. The solvent is not water. Water is a relatively scarce quantity, therefore changes in its concentration will be significant. The concentration of water thus must be included in the equilibrium expression.