What you need is spirit gum, which is specifically made for affixing acting props like false moustaches. I wouldn’t risk using anything else. While a product like Elmer’s glue is designed for use by children and probably isn’t toxic, it’s still assumed in testing that one isn’t going to have non-stop close facial contact with it, which may cause irritation or a rash.
A costume shop or prop house will undoubtedly stock spirit gum. Call your local playhouse and ask them where they buy theirs.
Edit: If you need this right away, is their any reason you can’t use bootblack or burnt paper ashes to simply smear a beard/moustache on yourself?