When I was a kid, my local library did a sort of reading monopoly game over the summer. They set up a huge game board, and kids could build their own game piece and participate in the game. The idea was that you roll the dice, move forward that number of spaces, and read a book based on the theme of the space you landed on. For reasons I don't recall, I only participated in this game one summer, and only rolled the dice once, but that one roll had lasting results. The space I landed on was ghost stories, and this was the book the librarian recommended to me.
The story is about a young girl named Zoe, who goes to live with her grandparents in their very old house. Many years earlier, the house belonged to a wealthy family with a little girl named Zoe Louise. Through the magic of the house's staircase, Zoe and Zoe Louise are able to travel through time to be each other's "imaginary" friends. But something's wrong with Zoe Louise, and Zoe is running out of time to figure out what it is and save her friend. It's a hell of a story, and though it's considered a children's book, Stonewords remains one of my favorite books to this day. Unfortunately it's not available as an ebook, but Amazon has cheap used paperback copies for sale. You could also channel your inner child and take a look for it at your local library.
Find Stonewords on Amazon here.