Can you play Dominion with 2 players? You can, and you should! It’s still the same great game as with more than 2 players, with only two small differences.
No king maker problem
The good thing about 2 player Dominion is that there is no king maker problem. The king maker problem is a widespread problem for board games. It occurs when a player that cannot win anymore, has to decide who wins the game. This very often happens in the last round of the game. In Dominion for example, a player that is too far behind to win often has to choose to buy the last Province and let player A win, or to not buy it and give player B a chance to win.
The king maker problem occurs in many other games too. In fact, it happens to some degree in all games with more than 2 teams (in free for all games consist of one player). Another example is that in Catan, players often king make by deciding (not to) trade with a player who could win based on that trade.
King making is frustrating because it makes who wins the game rather arbitrary, given that a player who could never win gets to decide it. In Dominion the king making problem actually occurs very frequently in games between equally skilled players. That’s why this is a pretty big upside when playing with 2 players.
Some cards become duds
Most cards in Dominion function the same and have the same power level when you play with 2 players. But some are a bit weaker.
Black Cat for example, which is one of the best designed cards in my opinion, is worse with fewer players. This is easy to see, as with fewer players there will be fewer opportunities to play this card as a reaction to your opponents’ actions.
Pirate Ship and Thief become complete duds when you play with only 2 players. The chances of them revealing your opponent’s valuable treasure cards are just too low when you only get to reveal two cards in total. This is a shame because these are fun cards to play with. (Although to be fair, Pirate Ship was never a great card to begin with…)