I'm having similar issues. Helped Florrick escape and got Wyll out of his pact, as usual. On my way to rescue the duke, I was ambushed by Florrick telling me Mizora told her the duke had been sacrificed. Florrick gives me the Ansur book, speaking to me as though the duke is dead. Rescued the duke, brought him back to camp where he chatted with Wyll and gave us ANOTHER copy of the Ansur book. Looked in my inventory - no books. Now everyone is talking like the duke is dead, except he's standing five feet away and waiting for me to go find Ansur using a book that doesn't exist. I could go do the Ansur stuff anyway since I've already done all this before, but now I'm afraid I'm going to mess things up even more if I skip a step. O_O
My girlfriend encountered this exact same issue as you today, and after googling it, we were unable to find a solution until I racked my brain a little bit. If Ravengard won’t give you the book, you should take it by force. She switched to Astarion, pickpocketed him, and talked her way out of it easily when he asked about it.
The sleight of hand check was -5, so the only way you could possible fail it is if you roll a nat 1 or have some way to get -7 on a roll of 2. So you don’t even need Astarion. Just use whoever is most persuasive or deceptive for you for talking out of it.
(She is playing on easy mode, so the numbers might be different for you. If its too high otherwise, you can just switch to easy mode and take it. It was supposed to be given to you anyway, so it isn’t cheating or anything.)