What type of child custody arrangements do you have? If a Court has granted you sole physical and legal custody of your child then, no, you don't need your ex's permission for her to immigrate. But if he was granted even just visitation, whether he sees her or not, you have to have his signed consent before your child can even travel internationally. My advice: if you don't have a court order already giving you sole custody, get one before you try to do this. You will get nothing but a fight from CIC about it otherwise. If your child's father really never sees her and doesn't support her, you shouldn't have too much trouble getting a court to strip him of his parental rights due to abandonment. But, as far as CIC is concerned, that's the only way to get out of your obligation to get his consent.
Also, what you said about not knowing if you can sponsor her, too - you have no choice. You HAVE to include her on your application, even if she wasn't coming with you to Canada, because she is your dependent. But CIC will not put themselves in the middle of child custody battles and they will not participate in anything that is akin to "kidnapping". So, if your ex has legal "rights" to his child, you can't take her across an international border without his consent - that's kidnapping.
It is not quite so simple in Morocco regarding child custody as it falls under Islamic law.
When child custody disputes arise between parents, one of whom is a citizen of Morocco, custody decisions are based on Islamic law. Child custody cases are complex. Moroccan courts consider the parents’ religion, place of permanent residence, income, and the mother’s subsequent marital status.
"Right of Custody and Travel Restrictions
Although women are normally granted custody of their children in divorces, regardless of nationality, the right of the father to control his children’s travel outside of Morocco is iviolabnle
. Therefore, even if the children bear U.S. passports, the father must approve the children''s departure from Morocco. Immigration officials may require proof that the father approves the departure. Women must also obtain permission to move the children more than 100 kilometers from their last residence prior to the divorce."