With an object that is in a normal circular or elliptic orbit around the earth, the average force of gravity over a complete orbit is 0. If this wasn't so, the object would crash into the earth or escape from orbit.
The average force of gravity can only be 0 with a circular orbit with the center of the earth in the center, or with an elliptic orbit, with the center of the earth at one of the focii.
For any other orbit you'd need an external force to prevent falling to the earth.
If you let an object bounce between 2 walls, the walls provide this force if they are not quite parallel. Two vertical walls some distance apart won't be parallel, Since they are aligned with non-parallel lines through the center of the earth. The object will get a tiny upward push each time it bounces.