It's probably not a "stack". That term is thrown around quite losely. It's probably simply just a vent. If it's just a vent then you can most certainly offset it around the cabinet. And if it's a wet vent extending through more then one story it's called a "soil-or-waste stack wet vent" and there are some rules that come into play when putting offsets in them. But none of these rules would probably apply to you anyway because you're offsetting mabye 2 feet. And you're allowed to offset a vertical wet vent by up to 1.2m for pipe sizes 2 inches and less.