There's no absolute requirement that the deposit be held in a trust account, but you're unlikely to find a rational purchaser (or their solicitor) who is going to be happy with it. However, if the deposit holder nominated under the contract is a real estate agent or a solicitor, they must hold the deposit in their trust account.
Without the deposit being held in trust, there's less certainty that the funds will be available should the contract not proceed.