If you car has airbags I would not recommend just using a sealant. Airbags depend on the windscreen fitting securely in place.
If you do need to use a sealant ensure it is designed for vehicle windscreens. A normal silicone designed for bathrooms might actually increase the rust.
Rust is like cancer for cars, it will keep spreading even if you put sealant over it. For your own safety rather have this fixed now as the rust will get worse.
Have the windscreen removed, remove all paint from the effected area, see how bad the rust is and get a body shop to repair it. You could try repair it yourself but this depends on how deep the rust is. If it's just surface rust you could do it yourself however if the rust is already through a panel you'll need professional help.