In other words, the cannon has a large mass and a small acceleration. The cannon ball has a small mass and a large acceleration. Apply this principle to a rocket. Replace the mass of the cannon ball with the mass of the gases being ejected out of the rocket engine. Replace the mass of the cannon with the mass of the rocket moving in the other direction.
Force is the pressure created by the controlled explosion taking place inside the rocket's engines.
That pressure accelerates the gas one way and the rocket the other. Some interesting things happen with rockets that do not happen with the cannon and ball in this example. With the cannon and cannon ball, the thrust lasts for just a moment. The thrust for the rocket continues as long as its engines are firing. Furthermore, the mass of the rocket changes during flight.