(I know @McTavish is pretty experienced, so this may be wildly missing the point, but is always a good thing to keep in mind…)
Authors should be careful to avoid the habit of relying on INSTEAD rules since an instead rule will ignore all other rules that might be involved in your world model, such as checking if objects are in scope, or if there is darkness, etc.
Check inserting something into the tree: if the noun is not the ring: say "No." instead; otherwise: say "Yes."; continue the action. [<-this is implicit in a Check rule and not necessary to include]
That does what you want - it blocks inserting anything into the tree but the ring, and allows all other normal parsing (is the tree here? is the ring here? is it too dark to see the tree?). You can include “continue the action” but the natural behavior of Check is to continue action unless the rule fails by hitting “instead” or is redirected.
If you use an INSTEAD rule, you probably also need to include all the checks the parser normally does: "is the player in the location of the tree? does the player have the ring? is the ring already in the tree? etc…) That’s why Check rules are better for this.
(It’s very likely @McTavish is aware and this was pseudocode for a different bug issue, so apologies if this is an unhelpful interjection!)