Hey Sylvie!
Yes, it’s possible for it to have fermented. There must have been some residual moisture in the buds—I’ve read about this happening with making fresh garlic infused oil. I’m wondering if the oil needed more time without the lid on to allow the gasses to escape, or if using a gentle hot water bath could have accelerated releasing any moisture before fermentation could occur. I’m not sure if you should use the oil, I’d be skeptical of using it internally, but perhaps externally could be okay. I’m sorry to hear this, I hope you can make another batch!