Can GSE know if I have a certain buff and cast an ability when I have it?

No it can’t - more info here FYI: Attempt at a Proc watching Macro. Result - Interface Action Blocked