All of the above refers to UK law (including that of Scotland), rather than directly to that of Canada. You should ensure that you have a copy of your residence order, granted by a court, when travelling. (If you don't take the original document you will probably need to get a solicitor to certify any copy which is made).
The Canadian authorities will also accept a copy of your residence order (='custody decree'), together with an appropriate letter. (That letter normally needs to be signed by both parents but, since you have sole custody, you can sign it on your own). See under "If a minor child is travelling with one parent only", here.
The documentation you require should have already been issued by a court, so there will be no need for your former partner to attend a solicitor's office with you.
Chris