Where you incur input VAT attributable to an intention to make an exempt supply and, before that intention is fulfilled, you use the costs in making a taxable supply, reg. 109 SI 1995/2518 allows for adjustment of the original attribution and recovery of the VAT previously disallowed. The time limit for making the adjustment is 6 years from the first day of the accounting period in which the original attribution occurred.
The provision of credit is an exempt supply to UK/EU. However certain exempt supplies when provided to non-EU counterparties are specified as allowing recovery of related costs [SI 1995/2518 Reg 103 and SI 1999/3121 refers]. Thereforeyou can recover the VAT incurred in what turned out to be a loan to a non-EU counterparty.
One would need to consider carefully whether the loan constituted a non-business activity which would not allow recovery of associated VAT on costs.