There's a fundamental difference between balancing a rocket on its thrust, and an object on a surface. The surface pushes up, the rocket thrusts along its axis. When the pencil strays from the balance point, the normal force of the support produces a net torque pushing it further out of balance. The rocket doesn't have that problem.