(1) This section applies if the court is satisfied that a party to a proceeding under the care and protection chapters—
(a) has been improperly or unnecessarily joined; or
(b) is no longer a proper or necessary party.
(2) The court may, on application by a party to a proceeding or on its own initiative—
(a) order that the party is no longer a party; and
(b) make any other orders or give any other directions for the conduct of the proceeding that the court considers appropriate.
(3) Before making an order under this section, the court must provide each party to the proceeding with an opportunity to be heard on the application or motion.