Please note that Japanese words themselves can also be written in katakana, sometimes as a sort of emphasis. Other reasons can be it being a brand/name, or because it is easier on the eyes, or because the kanji are too difficult. So it's not like every word written in katakana is a foreign one.
That said, most words written in katakana are probably foreign.