You can not buy an iPhone from Apple online in the US unless you have a U.S. issued credit card and a US shipping/billing address.
If you want to physically come to the US, you can buy one at any Apple Store.
The warranty will not be valid outside of the US. It will not work with LTE networks outside of the US. If you need out of warranty service, you will not be able to get it outside of the US. You will not be able to ship the phone to Apple in the US for service. You will have to physically carry it back to the US, or you will have to send it to someone you know in the US to take it in for service.