(3.26) Duration of Control Change
Unless otherwise stated (for example, with a specified duration), the change of control is permanent until the card that switched sides leaves play or control of the card switches again via a card effect.
Note that attachments that grant control effects end when the attachment granting control leaves play.
So in what situations does the second part of this rule apply? I assume that, in the case of Horn of Dragons, discarding the attachment will not change the fact that my opponent controls my dragon until the end of the phase, correct?