Yes. A rocking toilet almost always results in the wax ring under the toilet being squished and malformed. This may or may not cause the toilet to leak around the base during normal use. Even if the toilet doesn’t leak under normal use, if there ever is a sewer backup, water will begin to dump out around the base of the toilet as the lowest point in the house and flood the bathroom.
Furthermore, a rocking toilet can frequently result in damage to the toilet flange if left uncorrected and result in more expensive repairs down the road. For these reasons, it is always a good idea to fix a rocking toilet as soon as you become aware of it.