Before disconnecting from the Ancestry tree create a RootsMagic backup (.rmgb) using File > Backup. Once the RootsMagic database is disconnected from the Ancestry tree it cannot be reconnected. A new Ancestry Tree will need to be uploaded. Restoring the backup made prior to the database being disconnected can restore the connection to the tree.
To disconnect your RootsMagic database from the current Ancestry Tree go to:
Tools > File Options > Ancestry and click on the "Disconnect from Ancestry" button.