Yes, you can keep German blue rams alone. German blue rams aren’t particularly social, so they don’t mind being kept alone. As long as you provide them with plenty of environmental enrichment, they can keep themselves entertained.
With that said, German blue rams are the happiest when kept in a male-female pair. They’re monogamous and mate for life, so keeping a couple of German blue rams together is highly recommended.
Alternatively, it’s also a good idea to keep single German blue rams in a peaceful community tank. Because they’re relatively passive, they can get along with various other species, including: