Most likley yes. The 9 V relay will be the hard part to find. 5 V is common as well as 12 V. 9 V isn’t. If you only plan on handcrafting one single contraption like this, I would suggest trying various 12 V relays until you find one which is happy at 9 V.