It seems weird to me that direct hit says warsun or dreadnaught. Is there any errata for this to be used against a flagship?
Direct Hit vs Flagship
I believe it can just as well be used against Flagships, Carriers (Sol), Cruisers (Action Card), or any other ship that happens to have the Sustain Damage ability. Mechanized Units, however, cannot be targeted with a Direct Hit as it's explicitly for targeting ships involved in a Space Battle.
Also, if your Direct Hit Action Card mentions Warsuns and Dreadnoughts you are likely using an outdated version that should no longer be in your Action Card stack. If you are playing with the expansions one of them came with updated Direct Hit cards and instructions to get rid of the original Direct Hits from the base game (because their wording no longer applies, as you've experienced, and because keeping them alongside the replacement versions would result in you have too many of them in your Action Card deck).