There is a Czech song “na okně seděla kočka (byl horký letný den…)” – so is it possible to say “na okně” as well? And if yes, is there a difference in meaning?
Na is possible. The meaning is the same, sitting anywhere in the window where sitting is possible (be it for a human, for a cat or for a fly). But for a fly I would normally use only "na okně".
Sitting in a window makes no sense in English. Should be sitting on the window or by the window.
While ON should have been accepted, IN has higher occurrence.