Warping out of orbit, away
from the system is probably not risky. It's done relatively often enough. It might be rude
to do it, much like flooring the accelerator when pulling away from the curb.
a star, though, would be a more risky maneuver. You wouldn't want to disengage the warp drive at the wrong moment and hit the star's photosphere without your metaphasic shields up, or to accidentally slingshot into a different timeline, or just generally damage your engines when the warp systems try to deal with the already warped spacetime around a star.
As I recall, Dax was astonished that Kira ordered a warp maneuver in the direction of the Bajoran sun; Kira was willing to take the risk to catch the Bashir-changeling before he/she/it did whatever it planned to do. How quickly can a starship stop when coming out of warp? I'd be worried about stopping in time if I was trying to not
burn up in a star when coming out of warp!