The question of "possibility": Yes, I think Tasker could do that, but I haven't mapped it out exactly.
You can create a profile that looks for a text from a certain number or a text containing some content, extract the part of the content you need, and then Tasker could send an SMS using that content as the message, I believe.
Something like:
1. Your phone receives SMS from a number or with content you are interested in.
2. Activate a Profile in Tasker waiting for the Event mentioned in step 1.
3. When a Profile activates, you can pass Variables to the activated Task, so something like #mostrecentcode:
4. Send the content, or code, to the Task.
This is the part I'm less sure about, getting the content from the text to a variable. In the user guide, these are called "local variables").
5. The Actions in your Task can be as complex as you like, though you want to send a text to a certain number with the message content being #mostrecentcode
Not having tried this, I'm not sure where I would run into any issues. Maybe I would look to AutoInput or some other Tasker plugIn to make something easier.