Yes, you can put 120v and 240v in the same junction box. There is a code section specific to switches. If the voltage difference is less than 300v you can have the switches in the same box.
A. Snap switches must not be grouped or ganged in enclosures with other snap switches, receptacles, or...