hold on your horses, your story is confusing and your timeline does not match.
1. You told, that you were with your current wife in relationship past 9 years. Ok so far it is clear.
2. It is not clear if during those 8 years you were just dating each other (each of you living separately) or if you have moved together and lived together for at least 1 full year. That would make you a common law with here.
3. Somewhere during that 9 year period she cheated on you. That one is clear as well.
4. Around the end of 8 years of your relationship you immigrated to Canada. Here is not clear your current status in Canada (if you have just some kind of TRV or if you are PR or a Citizen already).
5. Now 1 year after you left (at least that what I understand) she cheated on you and became pregnant. So that alone would make your 9 years.
6. Completely unclear what happened after that, If your first statement of 9 year long relationship is correct, you or her decided to end it - that would make it 9 year relationship.
7. Then 9 months passed and she got a child.
8. Then 1 year later either after she slept with the other guy or 1 year after she had a child (as you did not specify), you decided to marry her. So if you did not break up with her, that would make at least 10 years or almost 11 years of relationship.
And now you want to sponsor her and her child.
Ok following will be important:
1. What is your status in Canada?
If you have just a TRV you cannot sponsor anybody, but your spouse can apply for spousal opened work visa (unless you yourself are just a visitor), which might be approved or rejected.
If you are PR and meet the RO or if you are Canadian citizen, then you are able to sponsor your spouse.
2. If you have lived together for at least 1 year, did you declare her as your common law during the process of obtaining TRV / PR from Canada?
Because if you did not do so you might be in rather big problem. You were supposed to declare your residential addresses for 10 years prior to coming to Canada. And once you start application for her she has to do the same. As a result they might find out that you omitted to declare her, which might be a problem.
3. Who is officially listed as a father of that child (on a birth certificate)? If it is you, despite that you know that child is not yours, then there is no problem. However if it is the other guy, then you will not be able to do anything with that child until your spouse has either legal sole custody of that child; or you have sole custody of that child or the father of that child.
So as you see answer to your question is not that easy and it will depend on further details.