You mean if you keep the base current low enough so the emitter current is also limited?
Sure, provided base current is low enough to keep \$I_C \cdot V_{CC}\$ dissipation within the device's rated power dissipation, with whatever heat sink you put on it. BJTs are current-controlled devices, they limit how much current flows through them even at a constant voltage. And thus power for a fixed voltage drop.
Daniele points out that \$h_{FE}\$ aka \$\beta\$ has a temperature coefficient, so if you wanted to actually try this, make sure to choose your bias current low enough that worst-case \$\beta\$ (at \$T_{J\max}\$ for example) will still only produce a small emitter current.
If you care about the actual operating point, you'd need some kind of bias feedback as described in Daniele's answer.
But if you just want to pull some current from Vcc to ground without exploding, not caring about the actual current or operating point, that's easy.
For example, hook up collector and emitter across a +5V supply, and connect the base to +5V via a 100 kOhm resistor. Ignoring the base-diode forward voltage drop, that's 5V / 100k = 0.05 mA base current. For a very optimistic \$h_{FE}\$ of 500, that's an emitter current of 25mA. With that 5V supply, that's about 0.125 W. Or less if the real \$\beta\$ is not that high.
Unless temperature can make \$\beta\$ rise higher than 500, there's no possible way for it to dissipate more power than that. I ignored the base current in the power calculation for this back-of-the-envelope calculation because it's basically fixed and tiny.
Vce = Vcc
. If you saturate the base current, it will pretty definitely fail. \$\endgroup\$