Defenses all the time will move defenders in and out of the box in an attempt to confuse an offense. Motioning a player from one side to the other is nearly impossible though for a few reasons. Not sure if that is exactly what you are suggesting or not? Anyways....
One is you have no idea when an offense is going to snap the ball so timing something like this isn't realistic unless an offense is 100% routine on their cadence. This is why you will see guys motion more up and down instead of side to side. Too much lateral movement pre snap for a defense can get guys out of alignment.
Two is the defense rarely calls a play and runs it exactly as drawn up. Depending on the offensive formation, alignment, motion, etc defenses are constantly making calls to adjust. The 101 example of this is the defense has to wait on the offense to get set to identify the strong vs weak side of the field so they can line up appropriately. Even before a play is called the defense has to wait on the offense to establish their huddle to know what personnel grouping they have and what players the defense needs to have on the field. For this reason, the defense is already behind the offense, schematically speaking, making it difficult to draw up a motion play on defense that isn't a timed blitz.
Third is that motioning a player on defense is going to leave you vulnerable at some point. A quick snap before you motion is going to leave a receiver uncovered or leave you in an unbalanced formation so the offense can outman you in the run game to one side.
The only way to truly do this that I can think of is using someone (probably a safety) to have no true responsibilities on the field. You scheme with basically 10 players and have one that can line up anywhere and play either coverage or as a rusher as they see fit. You might be able to get away with this to some extent in lower levels of football where you just have a superior athlete compared to everyone else on the field, but in the NFL I just dont think it could be done consistently. Covering every gap and every zone in coverage is tough enough with 11 players as is.