Some of the resurrected people like Sai's brother were freed from the jutsu although Kabuto told Tobi that the resurrected people can't be killed. This is a pic of a conversation between Kabuto and Tobi.
Similarly, Sasori also disappeared after telling Kankuro to use his puppet parents.
How can the souls be freed from the bodies even if the user who resurrected them did not release them? And why didn't this happen when the third hokage was fighting his predecessors during the chunin exams?
He was not killed, but his soul was freed. the Impure World Reincarnation Summons the souls to a body and binds them to the world of the living. Hence, they can not be killed by normal means. However, the Control is not perfect, and can be dialed up and down, as shown when Kabuto removes all emotion from the Third Raikage. He left most with their regular personalities for psychological warfare, but forced the bodies on autopilot to kill. It could however be broken by someone strong enough, Like Madara did and Hashirama could do the 2nd time he was summoned (note the first time he was significantly weaker and his personality was suppressed). If their Personality is intact, they can also break it by experiencing emotional closure Which is what happened to Sais brother. Its the same principal as a restless soul finding peace and moving on, the new found peace/closure of the Summoned breaks the binding and the soul is free to ascend back to the land of the dead.