Did Lord Buddha teach, or do Buddhist sects teach, about Ghosts?
There are many such stories in Petavatthu, which appear in canonical texts. Buddhist Cosmology mentions 31 Planes of Existence. The realm of Hungry Ghosts is one of these realms. Average people cannot see any of these realms other than the parts of the human realm and animal kingdom. This does not mean, what we see do not exit.

Also see:


From preta to hungry ghost by Piya Tan
Who are the hungry ghosts? by Piya Tan