Because you are replacing the switch, not installing a new switch, you can get away without a ground. You should install a nonconducting, noncombustible faceplate though.
404.9 (B) Exception. Where no means exists within the snapswitch enclosure for connecting to the equipment grounding
conductor or where the wiring method does not include or provide an
equipment grounding conductor, a snap switch without a connection to
an equipment grounding conductor shall be permitted for replacement
purposes only. A snap switch wired under the provisions of this
exception and located within reach of earth, grade, conducting floors,
or other conducting surfaces shall be provided with a faceplate of
nonconducting, noncombustible material or shall be protected by a
ground-fault circuit interrupter.
If you were installing a new switch, you would be required to provide an equipment grounding conductor at the outlet. And the switch would have to be properly grounded, in accordance with the National Electrical Code (NEC).
There was a time when an equipment grounding conductor was not required at each outlet, so it's fairly common to come across this situation (especially when working in older homes). You'll often see exceptions like this written into codes, so as not to require a full rewire just to replace a switch.
New info, Better answer
If you are replacing a switch a ground is not required, as per the above exception. However, if you're installing a switch; replacement or otherwise, into a metal box that is grounded. The switch will be ground via the devices yoke and mounting screws. So if the metal box is grounded, the switch is also grounded.
If the box is nonmetallic, and there are other grounded devices within the same enclosure. You can ground the new switch using a jumper between the switches grounding screw, and the other devices grounding screw. Just keep in mind, that you can't terminate two conductors under a single screw terminal. So if you do this, you'll have to use pigtails to make the connection between the devices.