Yes, rights can be bought back. Stephen had to do that when he wanted to remake The Shining as the miniseries. Warner Bros. now owns the rights for that title as well as Doctor Sleep and any other directly related works previously written.
Directly related to The Shining? Which others are directly related - apart from The Dark Tower?