Algae in hairgrass is usually due to the reduced flow when the grass gets too thick. All you need is a powerhead, filter flow or pump keeping the grass in constant motion. Yes, you can trim hairgrass too.
I'm a bit of a fan boy for hairgrass TBH, it's one of the few plants that I can grow well.
HTH