I’m not familiar with an addon that would work off of holstering/un-holstering a weapon, but I think what you want is for this to work if you are in combat or not. If that is the case various addons support this natively.
One that may interest you is Kong, it allows you to select frames in the UI and toggle their visibility based on conditions you specify, mouse over and other options. Its available on Curse Forge.
To make frames visible when in combat, select each frame you want hidden, check hide and use the macro option and specify [combat]. I also specify the macro [mod] which will show the frame when you press alt, ctrl or shift. By default the frame will be visible if you mouseover the frame or enter a vehicle. You can also create mouse over groups so that when you mouse over one frame all the frames in the group become visible. Kong also provides several built in options, such as making the frame visible when a your health drops below a specified percentage.