Yes, a guppy can live alone. If you want to keep just one guppy, you should get a male guppy, as females might already be pregnant when you purchase them.
While guppies can live alone healthily, you should consider keeping more than one. Guppies are very social and enjoy the company of other guppies. If a guppy lives alone, it might feel bored and stressed, which could eventually lead to sickness and death.
If you have a big enough tank available (one gallon per one inch of guppy), you should consider keeping at least three guppies.