The bible speaks of ghosts in a number of places, depending on the translation, but I'm not going to comment on the actual meaning of the passages (since I'm not a scholar of Greek or Hebrew).
The Holman Christian Standard Bible has "ghost" mentioned in two stories. The first is in Matthew 14 (paralleled in Mark 6) where Jesus walks on water. The second is during Luke's Easter story (Look at My hands and My feet, that it is I Myself! Touch Me and see, because a ghost does not have flesh and bones as you can see I have. (Lu24:39))
If you want to go old school, the King James Version (authorized) has 111 mentions of the word "Ghost"; though in fairness, a good number of these are references to the "Holy Ghost"; and a whole lot of the rest are contained in the phrase "gave up the ghost". In the New King James version, the phrase has been changed to a number of expressions, notably "breathed his last", "died", or (in the case of Mt 27:50 the death of Jesus, "yielded up His spirit".
The difficulty comes in the translation: whatever words were translated into alternately ghost, spirit, and who knows what else; each giving the audience a slightly different interpretation.
However, I *would* be willing to stick my neck out and wager that when the disciples on the boat saw Jesus walking out to them upon the water and cried out "It's a ghost [spirit, depending on translation]!"; they thought they were seeing the earth-trapped spirit of a person who had died at sea.