It really depends on which game you are playing.
In many Sonic titles you can control Sonic and a range of other characters, but some games lock you to a single hero. Check the specific game's roster to see who is playable, and most of the time, yes, you will get more than just Sonic.