There are two ways. The straightforward one is to finish the game and choose the Love option at the end, which returns your dog along with your family.
The second is a small trick on Knothole Island. Head up the slope away from the dock, keep left, and you will find a sign, a lever and a set of stone doors. Get any villager on the island to follow you, walk up to the doors so they open, let the villager step inside, then pull the lever to the left. The doors close, reopen, and your dog walks out. No quest progress is required and the expansion is not needed.