Could it be done if you are not a citizen of the US?
Yes, non-citizens can set up non-profits.
Because non-profits are tax exempt, to become a non-profit, you have to apply to the IRS.
Before you can apply to the IRS for non-profit status, need to legally form your organization. Usually, that means incorporating your organization, although it can also be a trust or an association. In the US, forming organizations is controlled by states. You should double-check for your state, but as far as I can tell, all states allow non-citizens to form and run corporations.
After you've set up your organization, you can apply to the IRS for non-profit status. They will check your plans and decide whether you qualify. Because a 501(c)(3) does not pay taxes, the IRS imposes additional requirements.
Where to go for more information:
Because business organizations are formed under state law, you'll need to check the requirements for your state. If you are lucky, your state government has a helpful website. If not, searching for your state's name and "how to incorporate" should give you plenty of information.
USA.gov has a nice overview of the application process here. The IRS has several publications and websites that you might find helpful: here, here, here, and here. These cover everything from the general rules to nuts-and-bolts details about which forms to use.