You need to have credit score to apply for mortgage.
If you have Social Security Number, Credit Score, at lest 3.5% down payment for FHA loan; 10% for convention loan if you have good credit score or 20% down; and your mortgage payment plus all debts (like student loans, credit cards.....) to income ratio (DTI) is no more than 42%; you still may get a loan.
Second way - cash offer.
Third way - you have relatives who trust you and would like to help you get a house. They may co-sign with you.
Fourth Way - private money.
Good luck with your home searching!
If you intend to buy property you don't need to be a US citizen. I know in other countries foreigners may not be allowed or experience restrictions if want to buy a house.