Cozumel itself has a very small Mayan site, very likely not what you are interested in. To reach the ruins at Tulum, you would have to catch a ferry over to the mainland, approx. 14 miles away, then get a cab to Tulum which would involve over an hours drive, then return via the same way and hope nothing happened to prevent you from getting back to the ship before it sailed. Personally I would not risk it but that's up to you. Another thing regarding the ferry between Cozumel and the mainland, it can be very rough so be prepared.
In Belize, you have to tender approx. 5 miles or so (about 12-15 minute ) from the ship to the port area. You can find cabs at the port area that will take you wherever you tell them to. The closest Mayan site of any real size is Altun Ha. I've been there a couple of times and the best I remember it's an hour / hour and half away.
if you decide to go it on your own, you must remember that a lot of these cabs aren't exactly what you see around your home town, regarding dependability, etc.
If your set on going on your own, I would do the Belize trip to Altun Ha.
But remember, -- once you get off the ship and take off on your own, the ship has no way of knowing where you may be or what may have happened if you're late. They won't sit and drum their fingers waiting--they will weigh anchor and head to the next port. I would do a ships tour but again, that's up to you.