Let's do this properly and then take the approximation that you are taking from the beginning. So, let's assume that the object that is rolling down is of mass $m$ and the ramp is of mass $M$. Let's work in a generic inertial frame where both are moving horizontally with a velocity of $u$. The object rolls down the ramp and then the object and the ramp have the final velocities of $v$ and $V$ respectively. The standard application of momentum conservation and energy conservation would give us the following equations:
$$mgh+\frac{1}{2}(m+M)u^2=\frac{1}{2}mv^2+\frac{1}{2}MV^2$$$$(m+M)u=mv+MV$$One can easily solve them to give $$v=u+\sqrt{\frac{2gh}{1+\frac{m}{M}}}$$$$V=u-\frac{m}{M}\sqrt{\frac{2gh}{1+\frac{m}{M}}}$$
Now, if you only wish to speak of the velocities, we can take the limit $\frac{m}{M}\to 0$ simply by looking at the expressions and obtain that $$v=u+\sqrt{2gh}+\mathcal{O}\Big(\frac{m}{M}\Big)$$$$V=u+\mathcal{O}\Big(\frac{m}{M}\Big)$$
These results match with what one would naively expect anyway--that if the ramp is infinitely more massive than the object then the speed of the ramp wouldn't change at all. However, here is the trick. If you want to speak of the kinetic energy of the ramp, you need to multiply the square of its speed with its mass. So, we need to do this carefully for the change in the speed of the ramp is suppressed by the mass of the ramp but if we are calculating a quantity in which we are also multiplying the mass of the ramp in the numerator, we better do it properly. So, let's properly evaluate $\frac{1}{2}MV^2$ (and $\frac{1}{2}mv^2$ while we are at it).
So, from the exact expressions of $v$ and $V$, we can write $$\frac{1}{2}MV^2=\frac{M}{2}\bigg(u-\frac{m}{M}\sqrt{\frac{2gh}{1+\frac{m}{M}}}\bigg)^2=\frac{1}{2}Mu^2-mu\sqrt{\frac{2gh}{1+\frac{m}{M}}}+mgh\Bigg(\frac{\frac{m}{M}}{1+\frac{m}{M}}\Bigg)$$ $$\frac{1}{2}mv^2=\frac{m}{2}\bigg(u+\sqrt{\frac{2gh}{1+\frac{m}{M}}}\bigg)^2=\frac{1}{2}mu^2+mu\sqrt{\frac{2gh}{1+\frac{m}{M}}}+mgh\Bigg(\frac{1}{1+\frac{m}{M}}\Bigg)$$
Now taking the limit $\frac{m}{M}\to 0$ we obtain$$\frac{1}{2}MV^2=\frac{1}{2}Mu^2-mu\sqrt{2gh}+\mathcal{O}\Big(\frac{m}{M}\Big)$$ $$\frac{1}{2}mv^2=\frac{1}{2}mu^2+mu\sqrt{2gh}+mgh+\mathcal{O}\Big(\frac{m}{M}\Big)$$
So, in the limit where $\frac{m}{M}\to 0$, to the leading order, the change in the kinetic energy of the ramp and the object are $$\Delta \text{KE}_{\text{ramp}}=-mu\sqrt{2gh}$$
$$\Delta \text{KE}_{\text{object}}=mu\sqrt{2gh}+mgh$$
So, the point is that the "additional" change in kinetic energy that the object seems to acquire in the case where $u\neq 0$ (in comparison to the case where $u=0$) is exactly the same as the loss in the kinetic energy of the ramp which would have been zero if $u$ had been zero. This "additional" change arises from a cross-term which survives at the zeroth-order even when we take the limit of $\frac{m}{M}\to 0$. So, that is why, the kinetic energy of the ramp does change in this process even if the ramp is infinitely heavy.
In fact, we should have done this procedure all along even in a frame where $u=0$ for we do not really know beforehand that the change in the kinetic energy of the ramp must vanish in the leading order.