I saved the dwarf!
First i damaged the dwarf till he fell down with the chains still attached to him. healed him up and then conversed with him and then continued to attack him till he fell down a second time (knocking down and dealing all damage with the same character. I then conversed with him again and the demon demands to be released. i broke the chains and the dwarf and demon where released separate. The demon possessed one of my characters as soon as it took its turn. I attacked my possessed character to about half health, healed them to full HP and then attacked my character which landed a critical hit putting them on 20 HP at which point the demon appeared again with only 300 HP. Killed the demon and conversed with the still alive dwarf. (on previous attempts the demon had possessed the dwarf again straight away, but i just reloaded and tried again).

Hope this helps guys! its a tricky one.