On a ferry? Of course they are transported with gasoline. The owners drive them on, then drive them off at the other side.
It seems you don't understand the concept of a ferry. It is like a bridge which moves with you. You drive on, the ferry departs and moves to some other location (other side of the river, other side of a lake) and you drive off. You can see the operation in this randomly selected video for example: https://www.youtube.com/watch?v=SkKTyf_RAzk )
ICE cars have gasoline in their tanks, because that is what they use to drive on the ferry and that is how they drive off the ferry.
itt: Tell me you've no clue how a ferry works without telling me you've no clue how a ferry works.