It IS possible to check in what scene the player currently is, it is a built-in method, a very handy one in that.
if SceneManager.scene_is?(Scene_Equip)
This would check if the scene is the equip scene or not.
You can check for all scenes in the game, just replace 'Scene_Equip' with the name of the scene class you want to check for.
But you used quite a confusing explanation, because if I understood it right, you want to check if a specific window is active or not.
Screen or menu means the whole menu which appears on the screen. That is the scene itself.
To check if a window is active or not, you would use this:
if @window_name.active
Replace '@window_name' with the name of the window you want to check for.
You should be able to find which window name you need if you look through the Scene_Equip class.
The slot selection window is '@slot_window', I think, and the equipment selection window is '@item_window', if I remember right, but still check it, I haven't checked that class for a while now.