Anyone can buy a car in the UK, as long as you have the money. If you do buy one, it must have a valid MoT (safety test certificate) if it's over 3 years old (they're all digital now, it's easy and free to check any car's MoT history on line via the government website).