Is it possible to play Metal Gear Solid 4 on Playstation 4?
I got the disc of Metal Gear Solid 4 from a friend. I know that it is not possible to play PS3 discs on PS4. However, to my surprise, I also saw that Metal Gear Solid 4 is not available on PS Now, nor on the PS Store for PS4.
Is buying a Playstation 3 the only way to play Metal Gear Solid 4?
No, you can't play Metal Gear Solid 4 on Playstation 4. As you wrote yourself, the PS4 is not backwards compatible, so you can't use PS3 discs or download PS3 games from the store unless they are specifically made available for PS4 (remastered versions or streaming via PS Now). Since the game is not in the current PS Now catalogue and there is no regular PS4 version of the game, you would have to buy a Playstation 3 to play it, as this is the only platform the game was released on.
As of December 9th, 2019 Metal Gear Solid 4: Guns of the Patriot (along with Metal Gear Solid HD Collection) is available on PS Now: https://www.playstation.com/en-us/explore/playstation-now/games/#allgames