If you have essentially no load requirement and you are looking for something cheap and easy to control, my suggestion would be an RC servo with a long horn coupled to a slot in the rod.
I don't have a way to draw it, but imagine that the bar you are moving is mounted in linear bearings that let it slide back and forth (bearings can be as simple as two pieces of nylon with holes drilled in them). Now a slot/hole is made in the rod large enough for the servo horn to pass through. Horn and bar are not attached in any way!
The horn is attached to the RC servo and the servo mounted so as the motor shaft rotates, the horn pushes/pulls on the rod. The necessary horn length you can calculate using plane geometry depending on how far you want the rod to move. There are more sophisticated ways of making the linkage (and reducing the backlash), but this is the simplest I can think of on short order.
Total cost should be less than a pneumatic air cylinder alone. I can get RC servos for $10 from the local hobby shop. Servo horn, metal rod and bearing material may add another $3. Actually, this is all stuff I have, so it's probably why I thought of doing it this way :-)
The servo itself can be controlled using one of the many, many examples online ranging from 555 PWM circuit to various microcontrollers.