A little Treeing Feist squirrel dog will tree squirrels as well as flush/roust rabbits and pheasants and such. But it won't trail a rabbit and circle it back around like a beagle will.
You are talking about two different types of dogs. Some will tell about a friend of a friend of an uncle who had a beagle that they taught to tree squirrels. But I never saw one. The treeing instinct is just that. It's not a trained task.
Here's my little Feist treeing a squirrel: