Only if you sign the power of attorney outside Spain. In that case, the power of attorney needs a Hague Apostille if your country is a party to the Hague Convention (most Latin American countries, the EU, and the US are).
If your country is not a member of the Convention, the document needs consular legalisation (a longer process). Morocco has a bilateral agreement with Spain that simplifies legalisation. Your passport and proof of reason do not need an apostille.