You're describing one form of carbon offsets. A cap & trade system is pretty much what you're suggesting, depending on the specific implementation of a cap&trade system.
they don't have to be.. but most cap and trade proposals include carbon offsets... so a polluter can complete an offset project OR purchase credits to pollute more.