This was a book I read around ten years ago. I read it in Swedish, unknown if it was translated or not. I remember getting it from the "youth/young adult" section of the library, though that library was sometimes confused about what goes in that section so that might not mean much.
The story is about a man who dies and comes back as a ghost, finding himself invisible and mostly unable to interact with the living world. Unlike typical ghosts they can't go though walls, finding all object still solid but unable to exert any force on them. They can fly in the air, but indoors would stop at a ceiling. He learns that people don't stay ghosts forever, with stronger-willed people having longer existences before poofing out. Being a laid-back sort of guy, he takes it in his stride and the book is mostly episodic about things he encounters while traveling around.
At one point he goes to Rome and meets a pope, who has been around as a ghost for a very long time — hundreds of years. At first he thinks the guy is just a kook, but other ghosts passing by and giving their respects changes his mind.
Once he sees a slaughterhouse with an endless stream of animal ghosts rushing out in confusion and only lasting a few minutes before disappearing.
Ghosts can influence dreams, and the more famous or powerful a person is the more ghosts try to influence them. The main character instead finds an old woman living alone in the countryside and uses dreams to change her life for the better, for example by finding a single guy she would fit well with and making him appear in her dreams, so she would interact with him when she met him and the get together.
There was a scene with a Ouija board where he and another ghost manages to influence the game for a bit. The other ghost was trying to make the people (two married couples) believe one of the women had cheated on her husband. The main character didn't like this and does something that breaks the tension in the room and their power no longer works. The other guy is annoyed, since getting that proper atmosphere is difficult.
At one point he witnesses a person dying at a party while drunk. Since mental states become fixed, that person was doomed to life as a drunk ghost, didn't ever realise he was dead, and quickly disappeared.