if the beam is on the car you can put an old steel rim on and then use the wieght of the car to stop it from turning while you undo it
if it's off then what you need to do is put an old brake disc on there and then find something to bolt to the hub carrier to stop the disc from turning
you'll need a vented disc as you can jam a screwdriver into the spokes, unles you've got vented rear discs then you an just put the cossie rear caliper carriers on and use them
just make sure you have someone standing ont he beam while you undo it as the last one i did needed the nuits cut to almost the threads then my dad standing on it, all 16 stone of him AND 300 ft/lbs on 4 foot worth of 3/4 drive socket to undo the nuts, and this was before i figured out i was turning them the right way as well