SAP GUI scripting: In a .vbs script that is executing a series of steps, I need to handle a certain popup. Is there a way to determine the screen that is currently active?

Yes it is.
In your .vbs script, use the variables

session.Info.program  (String)

session.Info.screenNumber (Long)