In case anybody was wondering, you can expose this ability in Bartender4 by removing a local declaration from the ActionBars.lua file.
local BT4ActionBars = Bartender4:NewModule("ActionBars", "AceEvent-3.0")
Doing this makes BT4ActionBars a global variable instead of a local one. In your macro you can then use,
BT4ActionBars = Bartender4:NewModule("ActionBars", "AceEvent-3.0")
where "id" is the Bartender4 actionbar number you are trying to show or hide.
/script BT4ActionBars:EnableBar( id )
/script BT4ActionBars:DisableBar( id )
I personally use this for a handmade mount macro. I stick the first two helper macros on actionbar 10, where one will call my random ground mounts and the other calls my random flying mounts. Now I have my main macro that will call a random ground mount on left-click or a random flying mount on right-click using /click. Without any code modification disabling the actionbar will still allow you to call /click on a button on that bar, however, once you logout and back in you can no longer do so. That's where the modified Bartender4 code comes in.
Here's what the final product macro looks like:
I apologize for the necro, although I do hope this information helps somebody looking for the same thing I was before I decided to check the code.
/click [button:1] BT4Button109; [button:2] BT4Button110