Ich danke ihr = I thank her (only her, not you)
The fact that German has 4 grammatical cases makes it necessary for you to learn the verbs and with what sort of objects they are used. E.g., "to thank someone" = jemandem danken" is using the dative object.
So, "ich danke ihr" - the pronoun after the conjugated verb is a dative object that translates to "her". If I had thanked you, it would have been "ich danke dir".
I don't think I understand this one. If i wanted to say, "I thank you," I wouldn't use "ihr" because that only means "you" in the Nominativ Plural.
If I wanted to say, "I thank y'all," then even if I didn't know that "danke" takes the Dativ, I'd say, "Ich danke euch," which is both Akkusativ Plural and Dativ Plural so no one would notice my mistake. :)
Am I missing your point?