I am assuming you are dealing within your bank for the offset. Your deposit agreement can also state offsets concerning the deposit account and offset from dealings within your bank.
Look at both the loan and deposit agreements for the correct language for your bank offsets.