@Carlo R I was thinking of using a similar technique to add a lens.icon (an emoji as Michel suggested) to a textfield. The only reason that kept me from doing this is that tomorrow Apple or Windows may change the way the textfield looks like, especially when focusRing is enabled.
The lens icon on the left as character is easy to add as Cue Text. It will work whatever the look of the TextField, and it looks real good.
Your point is valid : the TextField may change look.
Martin specifically wanted the icon inside the TextField, on the right, and text should not go under. The only way to do that I know of without declares is what I suggested. You may not have noticed my note about the focus ring needing to be carried out by a canvas under the assembly. The native one is unusable with that technique.
That said, if it where for my own program, I would simply place a 22x22 pixels BevelButton with the icon inside set right against the TextField. Or simply a canvas showing the icon next to the TextField. Keep it simple...
For not so simple possibilities, anything can be done using a canvas. It simply requires a tremendous amount of work.
If that was easy via declare, I suspect someone would have already posted something.