I'm finally grokking ann a bit better. It seems to add to or emphasize continuity of state with "to be". Oddly there's almost a proliferation of "a words": a, an, & ann, anns in Gàidhlig. I'm focussed on noticing and practicing the differences in pronunciation. I wonder if in everyday speech and writing the kind of difficulties English speakers have with there, their, they're have an equivalent with Gaelic "a words".
Firstly, native English speakers rarely have difficulty with there, their and they're. This is because there are two things that affect how confusing things are. One is what they sound like, and the other is whether they are used in the same place.
Let's go through the words you list. Anns is the easiest because it clearly has an s in and means 'in', but only when followed by 'the' or certain other specific words. That means that if you hear something resembling an or na after it it simply must be the definite article.
Next, ann can mean 'there', as in 'there is'. But it always comes at the end of a clause, so there is no way to confuse it with an article or preposition. Because the ann sound is distinctive (rhymes with clown in English) it cannot be confused with anything else except ann an which means 'in'. Learners often think ann means 'in' so ann an would mean 'in the'. This is simply not the case.
Ann an is a modern alternative to an meaning 'in'. It is only used without a definite article so is followed directly by a noun phrase. No one knows where it comes from, but it could have been added simply to avoid confusion with other uses of an. If so, it works very well.
A and a' are both used before a verbal noun. Whilst it causes learners a lot of confusion as to which one to use, and it is important, even in speech, because only the a causes lenition, it does not affect the meaning significantly. The fact that it is before a verbal noun generally makes it clear that it is one of these. There is one problem here. In some structures you can also get a 'her' and a 'his' before a verbal noun and this can give rise to confusion for the learner or even outright ambiguity - see below.
The other uses of an, a' are mainly 'the' at this stage of the course but will become more confusing when you learn the words for 'his', 'her' and 'their'. That will be covered later, but all I will say for now, is that if the word following is something that lenites then paying attention to that will help a lot, but if not then it is tricky. But there are words that you will learn that can be added to help with distinguishing these pronominal adjectives.
That leaves a. Other than before a verbal noun, mentioned above, this is used in the vocative and to mean 'that' (relative). All of these cases (when you get to them) are relatively easy to distinguish by context.
You also get a-, but that occurs in words you learn separately, like a-nis, so there will be no confusion once you have learnt these words.
I hope I have done a bit to sort out the ones that really are confusing from the ones that you can easily learn to distinguish!
Interesting point, that made me think and revise my answer a bit. There are two separate problems that affect learners here.
One is knowing what the sentence means. In my experience, children know what they mean and know what other people mean. What they don't know is how to spell the word. They often don't appreciate that they are using homonyms (words that sound and look the same) or heterographs (words that sound the same but look different). The difference is that with the first, everyone knows what is meant, in speech or writing, and you (as the marker) are none the wiser. Whereas with the latter, everyone understands in the spoken language, but then they write it the wrong way and people get confused and teachers get upset.
Excellent summary. True that the appearance of a as a relative particle, possessive, etc. starts to add cognitive load to speech, at least for awhile until they can be sorted out. Lazy English writing by humans (or poorly trained voice recognition and cheap microphones) make the problem appear more prevalent than it is in English. I look forward to voice recognition for Gàidhlig appearing one day, I like the idea of a computer racking its brain trying to figure out lenition.