To remove the link between a document and a contract, click on the document name, then on the 'contracts' tab at the top of the page:
Next click on 'unlink' next to the contract's name:
A little pop-up with the mention 'successfully saved' will appear at the top of your screen once the link is removed.