Captain Wag and the Polar Bears by Michael Terry
Captain Wag and his shipmates are surprised to see a bottle floating in the water. On plucking it from the sea, they find it has a message inside from their sworn enemy, Pirate Ginger Tom. He is being attacked by polar bears and in dire need of help! Even though they are the worst of enemies, Captain Wag and his shipmates, fighting through blizzards and icebergs, go to his aid, with some unexpected results A boisterous piratical tale and the third book in the Captain Wag series.