The answer to your question is yes!
By digging at least a 3-block wide tunnel around your corruption/crimson/hallow, you can prevent it from spreading outside of the boundaries that you give it.
This is an especially useful thing once hardmode is activated, since those two biomes spread with greater ferocity. Aequitas is also correct in that you could fill the same with incorruptible blocks, such as dungeon bricks or clay bricks. This worked especially well for me on my last playthrough, where I effectively contained the Hallow and Corruption from spreading farther than I wanted.
Do keep in mind, however, that activating hardmode will cause new corruption to spread, in a possibly different area than your original corruption biomes, so be prepared to make new boundaries once hardmode is activated.