In the case of a non-native English speaker using an incorrect word that is not particularly close to the intended word (whether I understood the intended meaning or not), I typically ask something like:
Did you mean [x] when you wrote [y]?
or, if I'm a bit closer with the person to whom I'm speaking, something like:
That word seems a bit odd to me there. What are you intending to express? [this is an invitation for circumlocution, to help identify the "best" and "most natural-sounding" word, even if I'm already pretty sure what that is]
I have appreciated such correction in learning other languages, especially in written communication that I can reference later. My rationale is that I want to become more fluent in those languages, and using an obviously incorrect word (in a way that native speakers in particular do not) is the opposite of that. Every interaction I have in non-English languages is one I view as another step in learning and refining my abilities.
I, personally, don't find it a rude action to be corrected on the spot and in fact I prefer not to be allowed to get used to making obvious mistakes. When offering such correction to others, I try to keep three things in mind:
Scale: The better the other person is at English, the more a correction can be seen as "polishing" their English skills, rather than wholesale criticism of their ability. Someone coming off of a single semester of learning English will make lots of mistakes, and probably won't benefit from having every one of those pointed out to them. Corrections should be geared more towards helping them master what portions of English they've already studied, not piecemeal instruction in fluent communication.
Frequency: If the other person makes four errors per sentence, their problems go beyond what in-the-moment correction can really handle. If providing correction would morph the conversation into an English lesson, it will completely derail that conversation. If person A wants to talk about a movie they saw, and all person B wants to do is point out formal grammar errors, then it doesn't seem like a conversation between A and B is really possible at that moment.
Formality, Detail, and Ability: Corrections in casual English use are probably best delivered from a "native speakers would say it this way" perspective rather than a strict grammatical one. A discussion of why a given verb must take an object in a given usage may be less helpful than simply pointing out that native speakers would use it with an object. The latter is directly helpful, while the former requires a formal grammatical framework that native speakers probably don't use (at least in English, in the U.S.). Finally, be sure you're right about your correction, or at least hedge ("maybe that's used regionally...")-- being pedantic and wrong is extremely irritating for everyone involved.
There are exceptions to these. Some social relationships are built around improving language skills (especially via video chat or with exchange students, etc.), and frequent correction is expected and desired in relationships like that. If someone has explicitly pointed out that they want to improve their English, more frequent and detailed correction is probably more polite than eschewing it, as that person has indicated that it is something they want.
Edits to the question have changed what it is asking, and it is no longer about simple spelling errors but rather about word choice by and vocabulary of non-native English speakers. This section remains for posterity, but is no longer well suited to the question as it is currently constituted.
There is no good way to do this generally, and text messages might be the worst arena in which to expect perfect spelling.
(This is a frame challenge, if it needs to be stated outright)
Custom and politeness strongly discourage direct criticism of others for unimportant errors.
People misspell things for a lot of reasons, including reasons other than ignorance of correct spelling.
Sometimes it's haste (typing on an on-screen phone keyboard makes mistakes easy).
Sometimes it's an overly aggressive autocorrect guessing the wrong word (this has happened to me quite a bit!).
Sometimes it's an intentional misspelling that conveys something (I've seen lots of GoT texts/twitter posts describing Ghost as the "best boi", for example).
Some people are simply not strong spellers, for whatever reason, and frequently make mistakes whether or not they care about spelling correctly at all.
But most importantly, people tend to hate being corrected over trivial matters. That has certainly been my observation, on both sides of the issue. If a word is spelled incorrectly, but if you understand it well enough to immediately know what word and meaning were intended, and can just as immediately think of the correct spelling, then their spelling was good enough to convey the idea. That situation suggests that the spelling error was not very important, and so your correction is not really necessary.
Among peers in casual settings, offering correction sends the signal that you know more and better than the other party (which, in this case, isn't inaccurate), but because the error is so trivial and consequence-less it can easily seem like you are simply showing off by putting the other person down. This impact is lessened or negated if you are in a position to demand or otherwise require good spelling, such as a teacher to a student or a manager to a subordinate, or if you are preparing some sort of documentation that will be distributed in the future.
Politeness is about social custom defining what a person owes to you and what you owe to them. It's far from clear to me, in lived experience in the U.S., that people owe or are expected to owe impeccable spelling to one another in casual chats. It's definitely not the case that social custom (again, in the U.S.) demands one immediately correct every mistake or error another person makes.
If you feel you must correct spelling, I would recommend not doing it in the moment. It breaks up the flow of whatever else is being discussed by diverting conversation to a trivial issue. If you can find a natural way to bring up spelling, or common misspelling of words, you might mention the word at issue (not the person who frequently misspells it) and how common it is for people to spell their as there, for example. This is very indirect, and I don't know that it would be very effective (if the person cared about correct spelling, it's likely that they would not be making the error so consistently).