Regarding the transistors collector-emitter rating, indeed, you need to take this in consideration. As you say, the transistor will see the full VCC voltage when it is off. Add some safety margin: don't use a 30V-rated transistor with a 30V supply. The supply certainly has some tolerance, so if you're unlucky, the transistor could blow up. Something like a 40V rating would be fine.