Its possible but you won't have time to see as much as you would like. We did Pompeii and Herculaneum and a meal in Sorento. But it was move.. move.. move... If we skipped the Herculaneum then we probably could have done Capri instead but we figured we would be back and would get to Capri on the next trip.
If you went to Pompeii and then Sorento and caught the high speed ferry to Capri and then the ferry from Capri back to the Port of Naples, it could be done but you have to plan very well. If there are delays (like a train strike or something)its going to throw you off. Get the train and ferry schedules on-line and plan it out and see if you would feel comfortable with the timing.
Carnival Cruise Lines:
Fantasy 90, Celebration 95, Victory 05, Conquest 05, Spirit 6/06, Freedom 6/08, Holiday 7/08, Victory 6/09, Valor 9/09, Dream 6/10, Splendor 8/10,Conquest 8/11,Magic 11/11,Triumph 4/12,Spirit 7/12,Freedom 11/12, Triumph 2/13 - The fire cruise, Magic 1/14, Freedom x 2 6/14
NCL Dream October 2006, RCCL Mariner OTS June 2007, Celebrity Silhouette 2013