grade i think u need to be a canadian citizen or a permanet resident to get your marriage a legal status./quote]
See this at
http://www.toronto.ca/marriage/index.htm: "There are no citizenship or residency requirements when applying for a marriage licence in Ontario." Other requirements are listed on that page. Every province is allowed to have different rules, so check the province you will be visiting. I'm fairly sure that no province in Canada requires residency or citizenship.
You cannot sponsor someone as your spouse/partner until after you are married or after at least one year in a qualifying common-law or conjugal partnership, and you have to be a permanent resident or a Canadian citizen to be a sponsor.
If you are already in a marriage or qualifying partnership before you get permanent residence, you are required to declare that when you apply. If you didn't declare it at that time, you can never sponsor your spouse/partner later.