What type of filler to replace a gasket but not permanently?
Permatex markets a variety of gasket sealants, depending on exactly what you're sealing. Of particular note in this situation are the various High Tack branded ones which combine gasket and adhesive. It's more likely you'll find them in an automotive parts dealer than at the hardware store.