It is possible but difficult. The buyer's solicitor will require either evidence the extension was exempt, a retention permission, a professional opinion, or indemnity insurance where the breach is time-barred. Most lenders will not release funds otherwise.
The first step is establishing whether permission was actually needed. Many rear extensions fall within the exempted development limits, and a professional can issue an opinion confirming that the exemption applied.
Where the extension exceeded the limits, retention permission is the clean solution but takes months and carries refusal risk. Resolve it before going to market rather than mid-sale.