If the rim is loose, you can remove it and put a thin layer of silicone inside the track of the rim that the glass fits into so that the entire lid is sealed and water cannot get underneath the lip when you put it back on.
If you cannot remove the lip, lower your water level and wearing a glove ( or moisten your finger) and add a small amount of silicone to your finger then run your finger under the lip, adding more silicone as you go, so that you seal the whole lip from the inside. With a glove, you keep yourself from getting sticky. If you don't use a glove, moistening your finger will help keep the silicone from sticking to your finger. For whatever does stick, I let it dry then it rolls off the fingers more easily.
As for which silicone to use, you may have to look at what you have available in Canada. GE makes a silicone that explicitly states " safe for aquariums" . I get mine at Home Depot in the U.S.
As previously stated, you want to do this on a day where you can get a lot of fresh air circulation because there will be a smell that can be overbaring to some. You also want to keep the area you silicone dry for 24 hours so it has time to cure. That may mean leaving the water level low in the tank for 24 hours after gluing.