Yes, non-US citizens can open a brokerage account in the US. Most of the larger brokerages offer foreigners the option to directly open an account with them. However, a select few countries may be prohibited from opening an account in the US. It is best to check with a brokerage whether it supports your country before you begin the registration process.
Alternatively, you can also open a brokerage account in the name of a Limited Liability Corporation. This will require a little bit of work on your end and will cost around $150. However, once you do that, you will be able to open a brokerage account through that LLC.