Yes and no. Let me explain:
You can run code in strings with another slot using the PRG functions, but you won't be fully able to access the slot you're executing from without using VAR("slot:varname")
Here's a simple solution which uses slot 1.
DEF CODE_EXEC S$ PRGEDIT 1 'CHANGE THIS NUMBER TO USE ANOTHER SLOT PRGDEL -1 PRGINS S$ EXEC 1 'MAKE SURE THIS IS THE SAME AS THE PRGEDIT SLOT END