The issue with a filter is it would then stop the lens-hood fitting, assume the same would apply for a stepping ring.
Maybe a soft-glue like you say, nothing runny so it stays when applied, but not strong enough that it can't be pried off again.
I'm still surprised it came off, given the lens hood lives on the lens, it can't have been knocked.