Citing how effects work:
610.1. A one-shot effect does something just once and doesn’t have a duration. Examples include dealing damage, destroying a permanent, creating a token, and moving an object from one zone to another.
610.3. Some one-shot effects cause an object to change zones “until” a specified event occurs. A second one-shot effect is created immediately after the specified event. This second one-shot effect returns the object to its previous zone.
(610.4 is the same thing for "phasing out" one-shot effects.)
Gaining control of a permanent, and a creature becoming a ring-bearer, are one-shot effects - so actually the effect of Act of Treason doesn't "end"; it's explicitly cancelled out. (The creature being a ring-bearer isn't a continuous effect; it's not an effect at all, but a property - "designation", in the language of rule 701.52b.)
Similarly, the creature that was hijacked stops being a ring-bearer; that status isn't put on pause. For the creature to become a ring-bearer again, there would have to be another source for another such one-shot effect - for example, if the creature itself theoretically said something like "whenever you gain control of ~, the ring tempts you".
Continuous effects are a bit trickier.
611.1. A continuous effect modifies characteristics of objects, modifies control of objects, or affects players or the rules of the game, for a fixed or indefinite period.
611.2a A continuous effect generated by the resolution of a spell or ability lasts as long as stated by the spell or ability creating it (such as “until end of turn”). If no duration is stated, it lasts until the end of the game.
611.2c If a continuous effect generated by the resolution of a spell or ability modifies the characteristics or changes the controller of any objects, the set of objects it affects is determined when that continuous effect begins. After that point, the set won’t change. (Note that this works differently than a continuous effect from a static ability.
611.3a A continuous effect generated by a static ability isn’t “locked in”; it applies at any given moment to whatever its text indicates.
Suppose I have out a creature with mana value 1 (which can be targeted by Dominating Vampire), and In the Trenches (an enchantment with an anthem effect). My creature gets +1/+1, just as a fact of life, because it is my creature. If you flicker the Dominating Vampire (say, with Planar Incision), and hijack my creature, it doesn't have +1/+1 while under your control. At end of turn, when it returns to my control, it has +1/+1 again assuming I still control In the Trenches - because that is the thing with the static ability maintaining the continuous effect.
Suppose that instead of having the enchantment, I cast Ritual of Hope this turn. The creature gets +1/+1 "until end of turn", because it's a creature I control when I cast the spell. The effect is associated with the creature for the duration of the effect. If you now flicker the Dominating Vampire to hijack the creature, it still has +1/+1 while under your control. At end of turn, when it returns to me, it no longer has the +1/+1 bonus, because the effect from the spell ends at the same time.