Icons, much like Strength, Keywords, and Traits - are treated as modifiable values (see Modifiers in the RR) that are constantly recalculated. Effects like Nymeria Sand , Confinement and Attained are simply applying a "-1" modifier to a certain icon type, while effects that add icons, such as Edric Storm, (Arya Stark, Syrio, and Syrio's Training are applying a +1 modifier to that icon. The effects of them all are cumulative, and whether the sum is 0 (or less) or 1 (or greater) determines whether the character is considered to have the relevant icon or not.
Note that in Nymeria's case, she's not "Stealing" the icon - she's choosing a character, applying a -1 modifier to an icon type, and (note "and" - not "then", so independently) applying a +1 modifier to sand snakes of that same icon type. There is no requirement for the first portion to result in a change from "having an icon" to "not having an icon" for the icon gain effect to succeed. Furthermore, the ability can still be triggered even if nobody went from having an icon to not having one (or the other way around), because it will still have successfully applied a -1 modifier.
Nymeria Sand gives an icon to Sand Snakes that are in play when her ability is triggered. If you ambush a Sand Snake after that, the new Snake will not get the extra icon.
- Removing the relevant challenge icon from a character while that character is already participating in a challenge does NOT remove the character from the challenge. Once a character is participating, it stays participating unless a card ability specifically removes it (see Highgarden).