The two were grabbing and pulling at each other over that book.
Tips
register
Vivid colloquial expression, mainly in northern dialects and older fiction. The 鬼 (ghost / devilish) prefix here is intensifying — 'devilishly tugging at each other's legs' — not literally about ghosts.
usage
Rare in modern writing. If you encounter it, it's almost always describing physical scuffling, kids playing rough, or two people who can't keep their hands off each other.