Section 27. A guardian or conservator appointed within the commonwealth, whose ward removes from or resides out of the commonwealth, may sell the real estate of his ward and transfer and pay over the whole or any part of the proceeds of such sale to a guardian, conservator, trustee, committee or other official appointed by competent authority in the state or country where the ward resides, upon such terms and in such manner as the probate court may, after notice to all parties interested, decree upon petition filed therefor.