That said "I can imagine" isn't terribly good science. Articles like https://en.wikipedia.org/wiki/Dynamo_theory don't make mention any role of the Moon, and googling around drowned out the actual question by talking about how the Moon might have once had a magnetosphere, along with articles about how smaller planets might be able to.