Yes! In addition to carrying soldiers with bows, javelins, etc., warships would also be outfitted with scorpions, catapults, and the like.
However, for the most part these ranged weapons were used as anti-personnel devices, intended to soften up the enemy to make boarding that much easier, or maybe damaging the sails and rigging. Generally speaking, with the exception of Byzantine firethrowers, these ranged weapons weren’t up to the task of sinking a ship.
Thus, ramming and boarding were still the dominant tactics in naval warfare before the introduction of cannons en masse allowed for the sinking of ships with repeated broadsides.