The physics
Watch from the wedge. It speeds up with acceleration A. So every body in its frame feels an extra force, mA, backwards. We call it a pseudo force.
along the slope: m g sin θ − m A cos θ (± friction) = m arel
across the slope: N = m g cos θ + m A sin θ
The block stays still when A = g tan θ. So the push must be F = (M + m) g tan θ. With friction, a whole window of pushes works.
A free wedge on a smooth floor moves back as the block slides. No outside force acts sideways, so the centre of mass stays put.