Yes, a pea puffer can live alone. Pea puffers are naturally territorial, aggressive, and individualistic, so a pea puffer will be fine living on its own. Unlike other more socially-inclined fish, a pea puffer will not get bored or depressed when living on its own.
In fact, only keep one pea puffer if you’re a novice fishkeeper. You can get used to taking care of your fish without having to worry about any conflict happening in the tank.
With that said, pea puffers like to shoal, so they will appreciate having some company. Once you’re ready, you can introduce a couple more pea puffers to the tank. Just make sure each fish has at least 3–5 gallons of space and there are plenty of plants and hiding spots in the tank.