Some ships may allow this. You will have to store the bike in your cabin. Please ensure you check with your cruise line prior to travel.
Fred Olsen - yes (foldable)
Ambassador - yes (foldable)
Cunard - yes (foldable)
MSC - offer 'Adventours'
For those cruise lines that don't allow you to take your own bike on board, many ports will offer bicycle hire. Or why not check to see if you can book a cycling shore excursion with Venture Ashore?