Think. The writer has mentioned clouds and a moon in the sky. The grey clouds have broken apart revealing the moon above the hills.
Of the items mentioned, clouds moving apart and moon in the sky (flying) and the hills (on the ground (not flying), which of these three nouns could possibly be called "flying rags"? Only the clouds are (a) flying and (b) plural (rags).
Therefore, the flying clouds must be the flying rags the author is referring to.