Well, yes and no. What you're not getting is the context in terms of what is happening and how the word sits in terms of cultural and historical values. If we look at the N word, we can see that it doesn't need that much context for it to be offensive, yet some Black people use it as a word to address each other.
I don't want to rewrite everything I have written so far, but think about how the N word is used to be offensive, that is how it is when a Thai person uses the word farang in an offensive way, when they use it in a non-offensive way, it's more like how Black people use it in a non-offensive way. Due to attitudes to foreign people in Thailand.
Have a think about that, or go and look at my/the previous comments in this thread. You should be able to get it.
The sentence would be offensive, but it doesn't make the word "American" offensive, no.
You don't seem to understand what context can mean. There is semantic context, as in your example, but there is historical context, cultural context, intonation, body language, and so on, that change the meaning of a word or the implication of its use.