In situations like the one you explain there are three countries and jurisdictions involved:
Home country (H): The country which nationality you have.
Residence / work country (R): The country you live and work in de facto
Client's country (C): The country where the company which employs you or contracts you has its seat
In your case: H = Portugal, R = ...
Yes, there is no rule against having several residence permit. The Schengen regulations are about visits and short stays and have very little to say on stays longer than 90 days and residence. EU law does have some rules about that but each member state remains largely free to manage immigration as they see fit.
Usually what you envision would be difficult ...