The rental does NOT need to be returned to the airport. You can drop it off in Cocoa Beach (near the port) . Most of the major rental companies (Hurtz, National, Avis etc.. have offices there.
We rented an AVIS car for one day at MCO (airport) and returned it that day in the office in Cocoa Beach. They have a shuttle bus that can take you directly to the port. I don't know if you they will drop you off at a hotel or not but you could call the office and find out.
There are several hotels near the port (We stay at the Raddison Inn at the Port) the night before. This hotel offers a port shuttle.
So you have a couple of choices-
1) fly in the same morning, rent a car at the airport, drive to Cocoa Beach, drop off the car and take their shuttle to the port. With the opposite for the return trip.
2) Fly in the night before and stay at a hotel near the airport and then #1 in the morning of the cruise
3) Fly in the night/day before, rent a car and drive it to the hotel and either keep it over night and use the rental company shuttle to the port (probably the easiest way) or drop your stuff at the hotel, go and drop off the rental and then figure out a way to get back to the hotel.
We did the last option and tried dropping the car off after stopping at the hotel and then going to see a movie. We ended up walking back to the hotel since the rental company had closed for the day so we could not use their shuttle. Not a big deal because we are walkers anyway but it was about 2 miles... So if you want to drop it off the same day, be sure to be able to get it back to the rental company before 6PM or arranged a ride back from the rental office. With the made rush of people wanting to use the hotel shuttle we realized it would have been worth the extra days rental cost to keep the car overnight and use the rental car's port shuttle. But that is up to you.
Hope that helps.
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