Yes, you can purchase rental property. Understand that rental property is but one type of business in the U.S. The biggest thing about rental property is that since it produces passive income, that income is not subject to the self-employment tax. So income from that endeavor can not be used to figure any tax deferred retirement contributions, and doesn't count for Medicare or Social Security (if you are subject to that.)
Finally, under no circumstances can you be an "employee" of the rental business. If you are working currently in the US on a H1-B visa, You CAN start a business, be it rentals, C-Corp or whatever just like any other, as long as YOU DO NOT work for that company. You can only work for the company that sponsored your H1B and only the kind of work specified in the petition. There is no deviation of any kind to this rule.