Rocking can be a symptom of something with the bike fit or the body. Being stable is important for power output over a longer period of time, as well as avoiding injury. If you are moving a lot, your muscles are working to stabilize that movement. That takes energy that isn't being used to make you go down the road faster and will increase your fatigue rate. Pains such as saddle discomforts or saddle sores, low-back pain, shoulder pain, knee pain, etc., can all be tied back to some level of instability somewhere in the bike/body system.
Stabilizing the body is a big part of what makes a good bike fit good. If you are not stable on the saddle, pedals, and aerobars, you are not as efficient as you could be. There is the work that can be done on the bike to accommodate you (and there are a lot of options - fit, saddle choice, crank arm length, cleat adjustments, etc.), and there is the work you can do off the bike to create a stronger/more stable/more balanced core. I see a lot of athletes, particularly long-course triathletes, who are an unstable mess. Triathlon training plans that have people trying to cram 12-20 hours of training into a life that is busy with work, family, and other obligations. The simple things that can really help improve overall stability and prevent injury get neglected.
Sorry, I think I went off on a rant there... To answer your question, yeah, you can do that for a short period of time, but it will cost you.
Travis Rassat
Vector Cycle Works Noblesville, IN
BikeFit Instructor | FMS | F.I.S.T. | IBFI
Toughman Triathlon Series Ambassador