AFL clubs will almost always hold a player to his contract. That's because players are difficult to replace and only become free-agents under special circumstances, hence they have intrinsic value.
There is no such thing as trading in the NBL.
However teams and players could come to an agreement.
In terms of a player's existing contract, there are four broad areas that need to be considered:
1) The common law contract, which within limits, can say almost anything you want to agree to. (However it is an interesting bit of trivia to not that the AFL system which binds a player to a club even after their contract expires is completely and unquestionably unlawful and unenforceable.)
2) Fair work and other employment law. As a general rule this might specify such things as an employees right to give notice and terminate.
3) FIBA/ NBL rules which would cover such things as clearances.
4) Australian Trade practices Law.
So if Gliddon or Player X wants to leave, whilst under contract, it probably goes something like this:
1) He has a contract which specifies he must play for say 3 years, and potentially includes clauses for buy-out, NBA, and Euro outs.
2) But under Fair Work law he can probably resign giving reasonable notice.
3) FIBA & the NBL might frown on this and his existing club would be within their FIBA right to withhold a clearance.
4) HOWEVER that is completely illegal in Australia. It is restraint of trade and specifically outlawed by the C&C legislation.