I thought "anlamak" was one of those Turkish verbs that is used in past tense for what we would say in present tense in English. Like if someone explained something here on Duolingo, I could answer "Anladim" which technically means "I understood" but if I said it in English, I'd say "I understand."
The best way is to learn the infinitive, yes.
-iyor "eats" the last vowel of the stem if the stem ends in a vowel, so it's impossible to guess what the last vowel might have been or even whether the stem ends in a vowel or in a consonant.
Also, anlımak would be a possible verb shape; it does not violate vowel harmony. Compare, for example, taşımak "to carry" which has that same vowel pattern.
yaşmak, yaşamak, yaşımak would all produce yaşıyor, so just from the -iyor form you cannot guess what the infinitive might have been.
And actually, the infinitive is yaşamak -- yaşmak is a noun meaning "veil" but I presume you meant the verb meaning "to live".