I will provide one example in literature for each possibility you mentioned.
One of my favorite games ever is Sid Meier's Alpha Centauri. It is like his Civilization games, but in a planet around Alpha Centauri rather than Earth. In this game there is a character called Planet (with a capital P). From the SMAC wiki:
Planet is what the living organism that dominates the planet is called. In earlier scripts it was called Chiron.
Its fungus acts as a giant brain. It can control all forms of native life, using them to attack any who upset it.
When the settlers get there, they are surprised to find that the dominant likeform on the planet is a fungus. Later they discover that the fungus is psionic, that it has merged with all other lifeforms, and that it has a single mind. Some of the settlers even manage to merge with Planet itself.
Planet also has the power to direct its fungal parts' growth, in order to interact with allies and foes.
Intelligent piece of rock flying through space
Mogo is an important member of the Green Lantern Corps. He is the one who forges new rings. I don't know whether he was made sentient by the guardians of the universe, but given their custom of granting GL membership only to the bravest and most honest sentient being of each sector, I believe Mogo was sentient before being made a GL.
Other ideas about intelligent planets:
The Overmind in Starcraft had "planetary" intelligence and tectonic size. When the planet it was on was covered in creep, we could consider the whole planet one intelligence. But the Overmind died and the planet moved on, so I don't think it fits the bill for this question.
Gaia, which in different myths and aspects is the embodiment, soul or spirit of Earth.
In the Star Wars universe, Death Stars are artificial planets. The literature on them never elaborates on the computer systems that run them - but if you let them be run by AI, then they could be said to be intelligent planets.
In the MCU, Ego (Starlord's father) is a planet.
In the Discworld universe, the planet where the stories take place is carried on the back of a Turtle that is much larger than it. Other bodies in the system orbit the turtle, not the disc. Therefore it may be said that the turtle is a planetary intelligence.
This Perry Bible Fellowship comic:
EDIT: One important question if the planet itself is an organism travelling through space, is how does it provide light for its inhabitants? I'm not sure if having a small sun orbiting it (Discworld style) is really plausible. Another option is having some sort of self illumination mechanism, which I don't really have the knowledge to come up with.
Cherenkiv radiation makes for the most beautiful blue light you will ever see in your life. However, unless you belong to a species that evolved in an environment with lots of it, staring at this beatiful blue light will tend to shorten your life.
Other than that, bioluminescent fauna, but specially flora, might do. By the way... If there is not enough starlight for your planet, then the most probable energy source for ecosystems at large in your planet is chemosynthesis. This is not renewable and the life on that planet is living on borrowed time (compared to a planet like Earth). Alternatively you can handwave a number of energy sources, i.e.: a stable wormhole brings energy from somewhere else, keeping the planet core hot, and life thrives on thermosynthesis... Or the planet orbits the galaxy core sufficiently close to it that it gets enough radiation (but that adds other problems, such as being in a nova-rich space).
I am also interested in having a symbiotic relationship between the planet and its flora and fauna. It's obvious what the planet provides for them (a suitable living environment), however what does the planet get out of this relationship?
In Steven Universe, an alien species reproduces by extracting ores from planet crusts in a very predatorial, unsustainable way. Native fauna and flora might make it harder for an invading, predatory destroying species to cause damage to the planet - so the fauna and flora would act like a planetary immunoological system.
Or maybe the planet just wants to play god. In games such as Sim Earth and Sim Life, for example, for all practical purposes you are the planet itself - and there is no reason to keep the simulation going other than for the player's amusement.