Yes it's OK temporarily. You should take care of it as soon as you can, however.
How to do it.
Take the wheel off, remove caliper and rotor. Turn hub to a point that there is enough room on the other side of the hub it for the stud to come out.
Depending on how much stud is left, you can either:
Put a shallow socket on the stud, one that fits perfectly over the threads without much movement. Hit the socket with a hammer so the stud will come out the backside.
If there isn't enough room for a socket to fit, or it's broken off clean, you'll need a punch. Position the punch on the stud and hit that with the hammer. Don't miss.
Once it's out, you can slide the new stud in and either using a stack of washers big enough to fit around the stud or a good size nut, place those on the stud to space the lug nut away from the hub.
Tighten the lug nut until the stud bottoms out
Remove the lug nut and washers/nut replace rotor, caliper, wheel, and the lug nuts. All five!