If you are allowed to work is a legal question. If you are not a US citizen you will have to discuss that with an immigration attorney. You will usually need a permit to work if you are not a citizen or resident.
To obtain a loan to buy a house you will usually need to demostrate a reliable income and acceptable credit history. Unless you are buying cash.