Actually, if you have a hidden nationality unit, and have team colour circles option enabled, you can always see which nationality the unit is. It's just attack by such a unit does not cause war.
I also noticed when I use a hidden nationality unit against other civs repeatedly, their attitude towards me quite quickly plunges to furious - so I think they also know that I am the owner of those hidden nationality units.
However still, giving a unit hidden nationality, invisibility and all as road flags makes an extremely powerful unit. The unit I made was called a "Preacher" available with polytheism - originally I just wanted it to be a defensive bombard unit (ie 0 range) - by 'preaching' before the battle it damages enemy morale, raises your troops' morale, etc. Then I decided that it should be able to penetrate enemy territory easily, so I gave it a hidden nationality and all as road ability, but so that it can survive in enemy territory I made it invisible (who is going to notice some crazy old man talking nonsense?

). After that I gave it 1 attack, 1 defense so that its it least marginally useful ... and it became a killer!
Once all civs got Polytheism, everyone started building Preachers, attacking each others' cities, killing workers and settlers, and generally causing havoc! I didn't take into account that by the time polytheism is researched, many cities still have warriors as the defending unit, so it makes possible for Preachers to capture cities with quite a high probability!
I now moved Preacher to Monotheism and gave it a negative HP 'bonus', maybe it will be better...