Anyone can apply for a patent in the United States, regardless of citizenship or residence! However, there are special requirements to look out for if you’re a foreign inventor filing in the U.S.
Source: https://www.uspto.gov/patents/basics/essentials#questions