By doing this, this will give them full access to your ancestry.com account. Any one that has this access can change anything including the subscription, and even have access to your credit card information.
I do NOT think that is what you are wanting to do. You can not share the just a password to A tree. You need to invite them to have access to the tree. Then give them a type of access you wish them to have.