I believe this is Running with the Demon (1997) by Terry Brooks.
From the Wikipedia description (linked above):
It concerns two magic-users, Nest Freemark and John Ross as they try to stop a demon that has come to town...
Later that day, an alarmed Pick leads Nest deep into the park forest and shows her a great oak tree with crevasses in its trunk. The tree is actually a prison for a maentwrog — a powerful magic beast known for devouring multitudes of people. The demon has weakened the tree and the maentwrog is threatening to break free, but Nest and Pick do a patch job to strengthen the tree's integrity.
I believe Nest is the girl you are remembering and Pick is the sprite that she sees.
The novel had a sequel, A Knight of the Word.