Yes, you can. Before you get on the bus, just inform the driver that you will not be continuing when the ferry docks.
Also remember to take your luggage with you from the bus. When the ferry is in port, you disembark via the gangway for pedestrians.
If you have any other questions in this regard, you are more than welcome to write to us here.