Yes you can, you can complete each modular element in a different state if you wish, but you can not, for instance, sit half your exams in France and half in the UK. The state that holds your medical certificate will issue your licence. There is nothing to stop you doing your ATPL theory in the UK and your CPL/IR course in Poland. It is not uncommon, in fact.