Yes, the temperature of a gas (either real or ideal) is lower at the top of a container. A simple example is Earth's atmosphere, which is colder at the top than at the bottom.
There's an obvious caveat: if the gas is in thermal equilibrium with its container, e.g. because the container is quite small or the pressure is quite high, then of course there can't be a temperature gradient.
The reason temperature varies with elevation is not quite what you came up with. I think your argument is valid within your definition of an ideal gas: the particles that climb high up in your box clearly have less kinetic energy than they did on the ground, so their temperature is reduced. (It helps your illustration to imagine that the box is 10 miles high and 10 feet wide.) But in the usual definitions, ideal gas molecules are small hard spheres, so their collisions induce scattering, which scrambles their speeds and directions. I think the effect of this scattering would be that the kinetic energy "lost" by a single particle as a result of rising up in the box would be refunded by collisions with other particles being scattered from below or above.
To show that the temperature of a gas decreases with increasing elevation, I reproduce a simplified version of the argument in Exercise 2042 from Doron Cohen's online stat-mech notes.
Consider a box of fixed volume in a gravitational field, containing an ideal gas that is not at thermal equilibrium. An arbitrarily thin "layer" of gas at the bottom of the box has pressure $P_0$, number density $n_0$, and temperature $T_0$, with $P_0=n_0T_0$ (eliding the gas constant for convenience). As some gas rises (or falls), it does adiabatic work on its surroundings, which changes the energy content of the rising (or falling) gas. Therefore, at every "layer" at height $h$ we have $$P(h)=Cn(h)^\gamma$$ where the constant is $C=T_0n_0^{1-\gamma}$ and $\gamma$ is another constant, the so-called adiabatic index.
The pressure must vary continuously up the box, which leads to the condition $$dP(h)=-mgn(h)\space dh$$
where $m$ is the mass of the particle and $g$ is the local acceleration due to gravity.
We have $P(h)=Cn(h)^\gamma$ from above, so $dP(h)=C\gamma n(h)^{\gamma-1} dn$. Integrating the continuity condition above with this definition of $dP$ brings us (eventually) to a final result,
$$n(h)=n_0\left(1-\frac{\gamma-1}\gamma \cdot \frac{mgh}{T_0}\right)$$
and since temperature is $T=P/n$, the height-dependent temperature is
$$T(h)=P(h)/n(h)=Cn(h)^{\gamma-1}=T_0-\left(\frac{\gamma-1}\gamma\right)mgh.$$
So we see that the pressure gradient induced by gravity produces a temperature gradient: the higher you go in the box, the colder the gas gets.
The short answer is ideal gas behavior is NOT only valid for hydrogen. The statement you were given in school is wrong. If anything, helium acts more like an ideal gas than any other real gas.
There are no truly ideal gases. Only those that sufficiently approach ideal gas behavior to enable the application of the ideal gas law. Generally, a gas behaves more like an ideal gas at higher temperatures and lower pressures. This is because the internal potential energy due to intermolecular forces becomes less significant compared to the internal kinetic energy of the gas as the size of the molecules is much much less than their separation.
Hope this helps.
Best Answer
A note on notation: I slightly deviate from the notational conventions in the question to use the notation standard I am used to. I use $V$ to denote the volume, in turn I denote the velocity as $v$. Also I use a lower case $p$ for the pressure.
The equation of state of an ideal gas is only valid in thermal equilibrium. This cannot be the case for an open system with a net flow (even if it is steady state).
However, if we consider a parcel of the fluid in its co-moving frame of reference, this parcel will approximately be in thermal equilibrium so we can use our equilibrium results for the parcel and this is how we compute the enthalpy $h$ per unit mass used in the generalized Bernoulli equation you quote (which assumes steady, inviscid, adiabatic flow). This approximation is known as assuming partial equilibrium and is quite good (in the sense that thermalisation is very fast for small volumes, so the approximation is very accurate). For the ideal gas we will get an enthalpy per unit mass of $$ h = \frac{U + pV}{M} = \frac \nu {2m} k T + p/\rho. $$ Where $m$ is the mass of the particles and $\nu$ is the number of degrees of freedom. It remains to express $\rho$ in the natural variables $p$ and $T$, which is achieved by rearranging the equation of state $pV = NkT$ after first multiplying both sides by the particle mass $m$: $$ \rho = mN/V = mp/kT.$$ Inserting this in the equation for the enthalpy we arrive at: $$ h = \frac \nu {2m} k T + kT/m = \frac{\nu + 2}{2kTm}. $$