It happens all the time. In fact, a recent article from the Associated Press recently described how growing numbers of Chinese citizens are coming to the United States to buy property. In the case of the Chinese citizens described in the article, they happen to be part of China’s growing upper-class who have plenty of money and are able to pay cash for these properties.
The question of being permitted to purchase property in the US and being able to finance property if you are not a citizen are two entirely different questions, however. To answer the latter question, the essential question is not whether the person is a citizen, but rather, what category of non-citizen the person falls into. Generally speaking, there are three types:
The first is a permanent resident alien. Typically, lenders will make loans to permanent residents on the same terms as they will make loans to a US citizen.
The second category is a non-permanent resident alien, for example, someone residing in the United States on a work-visa. FHA regulations, for example, permit lending to such a person if they have a valid social security card and the lender determines from their work visa that there is a likelihood that it will be renewed. Of course such a person has to fulfill all of the other requirements, e.g., work history, credit history, etc. that apply.
The third category is non-resident aliens, that is, someone who lives abroad who wants to finance the purchase of a property for use as a vacation home or rental property. Until recently, there were a number of lenders who offered loans to people who fell into this category. However, like so many other loan programs, these have been severely curtailed, if not eliminated.
So yes, it is possible for a non-citizen to buy real estate in the US.