IAS 1.32 states that "Assets and liabilities, and income and expenses, may not be offset unless required or permitted by an IFRS"
Therefore the general rule is that you can not set off debtors against creditors or vice versa.
However debtors and creditors are financial assets and financial liabilities respectively and they come under IAS 32 - Financial Instruments. As per IAS 32, a financial asset and a financial liability should be offset and the net amount reported when, and only when, an entity:
1. has a legally enforceable right to set off the amounts; and
2. intends either to settle on a net basis, or to realise the asset and settle the liability simultaneously.
Hope I answered your question.