You have an compilation error at line :
For (Loan__c loan: [SELECT Id, Loaned_Out__c FROM Book__c WHERE Id IN :bookIds])
Here you are querying Book__c but you are expecting Loan__c to be returned.
It should be .
For (Book__c book: [SELECT Id, Loaned_Out__c FROM Book__c WHERE Id IN :bookIds])
Also this line loan.Loaned_Out__c = loan.Loaned_Out__c - 1; is ...
Field Updates are part of the Metadata Workflow type and must be included when deploying an Approval Process that uses Field Updates
You can see this in the ApprovalProcess XML wherein the actions are an array of WorkflowActionReference per the doc
Represents the actions that occur as a result of an approval process.
Field Name Field Type ...