Drop a pencil - inclined at some angle to the horizontal - onto the edge of your kitchen table. It will be "ejected sideways" with absolutely no energy being "applied horizontally" in any active sense.
A snowplough pushing snow off the road whilst driving straight along the road would be another example.
I think the concept is known as "vectors".
Maybe I misunderstood your dropping an inlined pencil on a kitchen table edge. I thought the pen was parallell to the edge (one pencil end hitting the edge and a little later the rest of the pen contacting the edge) but maybe you meant it was perpendicular to it = one piece of the pen being outside the edge, the other inside on top of the table?
Well - certainly that part on the outside does not contact anything when it drops by the edge.
But some part of the pen will contact the edge - and if the pen is soft and the edge is strong (and friction is great), the pen breaks into two - it fractures! The upper pen part drops on the table and the lower pen part continues straight down.
No sideways ejection as far as I can see.
OK, let's assume that the pen is not so soft that it fractures but is elastic and just deforms like a spring at contact. Evidently the spring is compressed at contact and a little later decrompressed and bounces. As the spring is inclined the compression is both horizontal and vertical and the horizontal decompression pushes the pen outwards. Has nothing to do with gravity, though.
Any more questions about gravity?

