Amazon said that this phone is compatible with AT&T and T-Mobile, not locked. It is sold by Amazon.
If it is really locked, you can return it to Amazon for free, web page doesn't specify it. It shouldn't be a problem, I never believe that Amazon decline such request.
But if it not compatible with your operator (4G, LTE doesn't work), it is different story. In this case you might check frequencies of your operators and find one. Or you probably can return it to Amazon, but Amazon will change you for shipping and may be for restocking.
I want to purchase this phone from amazon(https://www.amazon.com/dp/B01MYRABC3/ref=nav_timeline_asin?_encoding=UTF8&psc=1) but its locked for at&t and t-mobile, there are a few international versions but they're not sold from amazon and I don't trust them, I don't live in the USA so is there anyway I can unlock this phone for international use after I buy it?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic