The picture on the left shows a male wood duck on a tree. The pic in the middle shows it in a tree (among the branches). The pic on the right shows it on top of (or at the [very] top of) the tree.
If you're talking about someone/something sitting in a tree, they are sitting among the branches.
When you say a bird is on the tree, I picture him up on the highest part of the tree. When a bird is in a tree, it can be on a branch among all the other branches shaded by other leaves above. No, the tree is more than its tree trunk, but some birds do nest in holes in tree trunks. Yes, scroll up to Granbjorn and especially to Aistobe and check out the "Wood Duck".