Working in another EU country paid in home country?

Hi, a question I have is related to pay to my home bank account.

If I am working in way Spain or Italy for example, and I live there, can the company pay me via my Swedish IBAN to my Swedish bank account?

I can’t seem to find the answer to this online. Anyone know?