Can I assume that you are referring to the term "Polack" rather than "Polak" or "Polka"?
I believe that the former has derogatory use, in the USA at least, but I've never heard it used it in the UK. The latter two simply mean "Polish male/female" respectively, and I can't imagine how they would be considered offensive, as they are the usual terms for a Polish man or woman.
Unless you were using it in an offensive context, such as e.g. "ty pierdolony Polak"
, but an English speaker would hardly be likely to be using the word like that, would they, and I don't think the OP used it like that either.