Yes, it is not an issue.
The setup has nothing to do with the ICloud ID in Mac OS.
You change the login in iTunes/Apple Music only.
The way I do it, the US account is my main account, and if I need to buy anything in Europe I use the European account for the transaction and then log back into the US account. You will need to do this on all devices.
For example, if you buy something on the “other” account you will need to login in on an Apple TV as well, otherwise the Apple TV won’t be authorized to play the content.
All EU purchases remain activated even when logged into the US account.
The only caveat is, your US form of payment won’t work (or vice versa). I use EU iTunes gift cards for the European store.