Yes perfectly possible usually. If it's damaged in an accident and has had a claim on the insurance then it may be a catagory D salvage in which case all you have to do is repair it and tax and mot it as normal, or it might be a catagory C in which case you do the same but it might also need a 'vic check' which is carried out at the local DVLA depot and is only to ensure the car's identity nothing more and costs about �35 the last time I did it I think.
Only if it's a catagory B can it not be returned to the road and even then there are generally ways.
If it's just been sold to the yard by it's owners and is undamaged then just go right ahead and do it up, no hassle at all.