Yes you can apply for H1B from a consulate in canada. It is easier to apply for it through USCIS. But sounds like you can't do that now. So you really don't have a choice.
Immigration to canada has nothing to do your H1B application.
Immigration to canada has nothing to do your H1B application.