Addressing Your First Question
We can tell whether an allele is dominant or recessive based on patterns in family trees, that is true, and it is very helpful! However, that is not the only way, since by looking at the molecular function of the alleles, the dominant and recessive relationship between alleles can be assessed without needing to look at family trees!
I think a deeper understanding of what it means to be dominant versus recessive would be helpful, because usually biology isn't just that simple! In most scenarios where there is a distinct recessive and dominant trait, it is because the dominant trait causes some specific activity/functioning protein while the recessive trait does not. Let's look at an example of this:
Let's choose eye color:1
There are multiple genes that affect eye color but let's just look at one: the one that codes for the brown pigment (melanin) to be produced in the iris [specifically the HERC2 gene]. As you probably already know, brown eyes are dominant and blue eyes are recessive.
Let's call the dominant allele B and the recessive allele b. The only way for blue eyes to be the phenotype is for the allele combination to be bb. Now think about why this would occur on a molecular level. Alleles are just forms of genes, which then in turn code for some protein. Think back to what we said earlier about how most of the time dominant alleles cause some certain activity within the cell and recessive alleles do not. We can now use that knowledge to uncover the molecular basis of this eye color scenario: The B allele codes for the brown pigment to be produced in the iris, while the b allele codes for a dysfunctional protein that does not lead to melanin being produced, leading to a blue-ish color seen. So, if the B allele causes the production of melanin and the b allele does not, it makes sense by the B allele would be dominant in this case. In the case of Bb, melanin is still being produced (even if it is because of just one allele), so there still would be brown eyes! Therefore this makes sense by bb is the only allele combination that results in the blue-eye phenotype, because it is the only combination with no allele still producing melanin. This is why brown eyes are dominant to blue eyes, because blue eyes can only exist without the presence of any B allele.
So, by knowing how an allele actually functions on a molecular level, that can help us to understand if it is in fact dominant or recessive to another allele. We should also acknowledge that genes do not necessarily need to be in this black-and-white relationship of recessive or dominant. There is also incomplete dominance and co-dominance!
Now to Your Second Question
When talking about three alleles, it is important to understand that allele dominance only is used when comparing one allele to another allele. So with three alleles, the dominance, recessiveness, co-dominance, or incomplete dominance is between two of the alleles.2 So if we are talking about alleles A, B, and C. We could say things such as:
- A is recessive to B, B is dominant to C, C has in-complete dominance with A, etc...
However, it is really up to the molecular function of each of the alleles and to determine how those interactions would take place. But to answer your question directly of "can we have 2 dominant alleles," the answer is sort of. Allele B and C can both be dominant to allele A, but that says nothing about the interaction between Allele B and Allele C.
1 This is a simplification of the actual molecular mechanism of eye color, but at a simplified level this works to illustrate our point. You can read more into the genetic/molecular basis of eye color here.
2 This article is very good at discussing alleles and clarifying the point that dominance is only between two alleles.