It is a violation (not a technical foul) to leave the court for an unauthorized reason. I would not consider planting a foot on the sideline to violate this rule.
However, you are correct that legal guarding position cannot be established if the defender has a foot out of bounds. A defender cannot draw a "charge" if he is out of bounds.
|