How to differentiate between the four possessive forms of "Ihr"?
Is one of the forms (formal plural and singular "your"; her; their...) always capitalised or something like that? Or should one always find out based on context?
Bookmark the Wikipedia page on German pronouns. You're talking about possessive determiners, which are often mistakenly called 'possessive pronouns'.
As a sentence, Ihr Buch could mean "Your book" (formally, to one or more people), "Her book" or "Their book". There is no way to tell which one was intended without further context.
If the sentence did not start with ihr, it at least separates out the formal possibilities:
Das ist ihr Buch = "That is her book" / "That is their book"
Das ist Ihr Buch = "That is your book" (formal, to one or more people)
The only always capitalized pronoun in german is the formal You, i.e. Sie.
You're perhaps confused because the 2nd person formal You (Sie) is not a capitalized informal 2nd person (ihr), but rather is like the 3rd peson plural form (sie).
we = wir
you = ihr
they = sie
You = Sie --- See? It's not Ihr, it's Sie.
The capitalization rule is valid for all forms of the pronoun.