As long as you are in US legally, on any visa, you can buy property.
Immigration law does not restrict business activities.
Owning a (rental) house will not affect your greencard process.
It will affect your taxes. Please note in the disclaimers at the
bottom od this page that GA (this service) does not provide legal or
tax advice, but obviously,
(as a general information) rental income has to be shown on both
state and federal tax returns and you will be assesed a real estate
The title company oficer will explain all that (at no extra cost) when you
are closing on the purchase of the house. Realtor can also provide information
on any restrictions you may encounter (lately, source of the cash may
be scrutinised if source is abroad).
In general - owning a house brings tax advantages - but you will not have
'homeowners exemption' and other tax credits when you rent it out.
Without permanent residency you may find it more difficult to get a mortage,
so, unless you do have all required cash, you may want to wait.
Note that there are other ways to invest in real estate then buying a house