In my textbook (Resnick Halliday Krane), the derivation for pressure in a fluid at a given depth is done assuming that the fluid is homogeneous. Thus, the book concludes that the pressure in a fluid is the same at all levels given that the fluid is homogeneous and not otherwise. I had two problems with this:
Consider a vessel in the following shape, with two different area of cross-section.
I know, from experience, that the level of water must be the same in the two arms. Indeed, that is necessary if the pressure is to be the same at the points $A$ and $B$ at the same level. But if we consider the situation in the following manner, there is a contradiction. Consider the whole volume of fluid between $A$ and $B$ in the tube as the fluid element.
As the pressure at $A$ and $B$ is the same ($p$, say), the force exerted by the fluid above $A$ on our fluid element will be $pA_A$ where $A_A$ is the cross-sectional area of the larger arm. Likewise, the force exerted by the fluid above $B$ on the fluid element will be $pA_B$ where $A_B$ is the cross-sectional area of the smaller arm.
But clearly, $pA_A > pA_B$ since the areas are different. How is the fluid then in equilibrium?
As pointed out in the comments below by LDC3, this setup is similar to that of a hydraulic press. So the question may be rephrased: if we put a large weight on one arm of the hydraulic press (the one with the larger area), and a small weight on the other (the one with the smaller area), why does the fluid in the press stay in equilibrium? There are clearly two unbalanced forces acting on it.
The book also presents the following argument to prove that for the pressure to be the same at two points in a fluid, the fluid must be homogeneous. Consider a typical u-tube but filled with three fluids of different densities. The densities are of the order: blue > green > red.
Now, the book says that as the fluid is in equilibrium the pressure at the interface (of red and blue fluids and green and blue fluids) must be equal in both arms. Thus the pressure exerted by the column of red fluid equals the pressure exerted by the column of green fluid (the heights are different as the densities of the fluids vary).
Now, consider two points at the same level. One point is in the green fluid and one point in the red fluid. Thus the points are not in the same fluid. Also, since the height of the two points is the same above the interface, but the densities are different, the drop in pressure from the interface to $A$ is less than the drop in pressure from the interface to $B$. Thus the pressure is different at $A$ and $B$.
But if we again consider the fluid between $A$ and $B$ as the fluid element, we may follow a similar argument as in the previous point to arrive at a contradiction. The cross-sectional area of the two arms is the same ($A$, say). Thus the force exerted by the fluid above $A$ on the fluid element is $p_AA$ where $p_A$ is the pressure at $A$. Likewise, the force exerted by the fluid above $B$ on the fluid element is $p_BA$, where $p_B$ is the pressure at $B$.
But $p_AA < p_BA$. How is the fluid then in equilibrium?