Let's suppose that there is a physically meaningful equation
involving the variables $(v,g,\lambda,\rho,h,\gamma)$.
Since these six variables have three dimensions $[L, T, M]$,
you can form $6-3 =3$ independent dimensionless quantities with them, e.g.
$ ({v^2 / g\lambda},\ {h / \lambda},\ {v^2 \rho\lambda/ \gamma}) $ or
$ ({v^2 / g\lambda},\ {h / \lambda},\ {\gamma/ \rho g \lambda^2})$.
The Buckingam $\pi$-theorem tells us that the equation we are looking for
must be a relation between these three dimensionless variables:
$$ F\left({v^2 \over g\lambda},\ {h \over \lambda},\ {v^2 \rho\lambda \over \gamma} \right) = 0
\qquad or \quad
F\left({v^2 \over g\lambda},\ {h \over \lambda},\ {\gamma \over \rho g \lambda^2} \right) = 0 $$
If we neglect the surface tension with the variables $ (v,g,\lambda,\rho,h) $
we can built $5-3=2$ independent dimensionless quantities $ ({v^2 / g\lambda},\ {h / \lambda}) $
and the $\pi$-theorem now suggests the simple pre-formatted relation:
$$ F\left({v^2 \over g\lambda},\ {h \over \lambda}\right) = 0 \qquad\qquad
alias: \qquad
v = \sqrt{g\lambda}\cdot f\!\left(h\over\lambda\right) $$
It's worth noting that the velocity $v$ does not depend from the density $\rho$.
The explicit form of the function $ f () $ cannot be obtained by dimensional analysis alone.
In the case of very deep waters, we can assume that the parameter $h$ may be irrelevant and that
the meaningful quantities are $(v,g,\lambda,\rho,\gamma)$. The two dimensionless variables
are $ ({v^2 / g\lambda},\ {\gamma/ \rho g \lambda^2})$
and so we have
$$ F\left({v^2 \over g\lambda},\ {\gamma \over g\rho\lambda^2}\right) = 0 \qquad\qquad
alias: \qquad
v = \sqrt{g\lambda}\cdot f\!\left(\gamma \over g\rho\lambda^2 \right) $$
Airy's wave theory gives the following explicit expression for the velocity of the waves:
$$ v = \sqrt{\left({g\lambda \over 2\pi} + {2\pi\gamma \over \rho\lambda}\right) \tanh\left(2\pi h \over \lambda\right) }
\qquad\qquad alias: \qquad {1 \over 2\pi} {g\lambda \over v^2} + 2\pi {\gamma \over v^2\rho\lambda } = 1 / \tanh\left(2\pi {h \over \lambda} \right)
$$
As you can see, Airy's equation actually has the form required by the Buckingam $\pi$-theorem.
If we neglect the surface tension ($\gamma=0$) we have:
$ v = \sqrt{{g\lambda \over 2\pi} \tanh\left(2\pi h \over \lambda\right) } $
If $h\ll \lambda \ \tanh \to 2\pi h/\lambda)$ we have
$ v \simeq \sqrt{gh\left(1 + {4\pi^2\gamma \over g\rho\lambda^2} \right)} \simeq \sqrt{gh}
\qquad\qquad\qquad$ (shallow waters)
If $h\gg \lambda \ (\tanh \to 1)$ we have
$ v \simeq \sqrt{{g\lambda \over 2\pi} + {2\pi\gamma \over \rho\lambda} } =
\sqrt{ {g\lambda \over 2\pi} \left(1+ {4\pi^2\gamma \over g\rho\lambda^2}\right) }
\simeq \sqrt{g\lambda \over 2\pi} \qquad $ (deep waters)
Of course such results are outside of the dimensional analysis.
However I don't quite understand your ''last question''.