Yes, totally. I've seen it done. In Babylon Five there are "Soul Stealers" who come in ships when there will be great death and collect souls, preventing them from moving on. They seem to have trapped these souls in something like Christmas Ornaments - the hollow glass ball ones. They show a scene of the female lead, at the end of one episode, breaking these spheres and releasing the souls, much as the prophecies are released from the glass balls when they break.
My idea for how to do this is that a prisoner in Azkaban kills a dementor (I need to flesh this out a bit more) and then Barty wakes up in St Mungos' (Demented ward lol).
The death of the dementor released the souls it had consumed and the soul just happened to be Barty's.
Wow now this sounds far fetched.
Does anyone think this would be possible????