Check your local regulations on what is needed to purchase a car in your state. As far as I know you don't have a license to purchase a car. You may have to provide insurance or some id though. Of course you can't drive it away yourself.
As long as you have proper credential proving who you are and enough cash you car should be able to. You can't drive it home obviously but there is no problem buying it. Some states may also require you to have insurance once purchased though so check local regulations.