It might sound flat but yes poker can be played with just 2 players. It is called a “heads-up”. There are certain rules which differ in this type of poker to multiplayer poker.