I usually don't suggest doing this independently because of the variables. Just note the words on the ferry schedule
such as 'almost every hour' and 'timetables often change'. It's Mexico and strict adherence to a schedule is never a priority.
You really won't have a lot of time. Carnival Dream is there from 10am to 6pm. The first ferry you could take is at noon and that puts you in Playa Del Carmen around 12:45pm. You'd then have to take the 3pm return ferry to Cozumel. Waiting for the 5pm ferry would be a bad idea. This leaves you around two hours in Playa.