Could it have said "Sxi dankas patrinon..." ?
Then it would have been "She thanks a mother".
For "She thanks the mother", you need Ŝi dankas la patrinon.
And yes, you could have said it that way as well.
it's hard to understand what the direct object is. Is it the person being thanked, or the thing for which one is thankful, or either?
It can be the person being thanked, or nothing.
The person being thanked can be the definite object, or can be in a prepositional phrase started by al as in Duo's sentence (Ŝi dankas al la patrino...).
The thing which one is thankful for is in a prepositional phrase started by pro ("because of") -- I am thankful "because of" the meal.