fluid statics - Hydrostatic pressure - doesn't density vary with depth ...

Our class is learning about hydrostatic water pressure and we have been told that we can calculate the force of the liquid on an object at any depth using "the density x 9.8 x the depth". However, as the depth increases, wouldn't the density of the liquid increase because of the weight of the liquid above it compressing it? So should't there be something in the equation to account for the varying density? To me, "density x 9.8 x depth" seems like it is saying that the density will be constant...
$P=\rho g h$ holds only if the fluid that you are considering is not compressible, that is a liquid. Try to fill a syringe (without the needle) with some water, then close the hole and try to compress it: you will notice that you cannot do much, indeed liquids are not compressible, this mean that the density $\rho=m/V$ does not vary with pressure because the volume stays the same.
However when applying a physics relation it is important to understand its limits of validity. For instance if you compress water a lot you may even force the molecules to pack together and get ice, this will of course break the equation. But with liquids in everyday life that is just fine.
$\begingroup$"For instance if you compress water a lot you may even force the molecules to pack together and get ice" Is that really possible? AFAIK increasing pressure decreases the melting point.$\endgroup$
as the depth increases, wouldn't the density of the liquid increase because of the weight of the liquid above it compressing it?
No, it doesn't - or at least only negligibly so. At normal pressures, liquids are essentially incompressible. This table gives the compressibility of some liquids, including water. Note that the units are to be multiplied by $10^{-11}$ per Pascal. For water you get 46ppm per atmosphere. In most cases that is negligible.