Ordinarily, these matters are governed by the Vienna Convention on Succession of States in respect of Treaties ("the Convention").
Assuming Ruritania ratified the Convention
One could conceivably argue that Evilstan colonised Ruristan and therefore under Article 16 of the Convention, New Ruristan receives a "clean slate". This means it is free of any binding obligations imposed on the predecessor state and therefore this treaty of allegiance would implicitly be null and void.
However, it is also arguable that New Ruristan is simply a continuation of the old state and has accumulated parts of it, therefore under Article 34(1), the existing treaty obligations would continue in full force unless both states (New Ruristan and Ruritania) agreed to set aside the treaty under Article 34(2).
This would be a matter for the International Court of Justice to decide. If both states submit to its jurisdiction, a binding ruling would be created and apply, and that would conclusively settle the matter as international law. However, the Court has no jurisdiction if one party refuses to submit.
In any event, there are very real issues with enforcement of any ruling, assuming it went against New Ruristan and in favour of Ruritania with the result being that the old treaty still applied against the successor state. See "Enforcement" for more details.
If there's no ratification of the Convention
New Ruristan would not be bound by the Convention and therefore would be free to apply or disapply any treaties created by the predecessor state since there would be no obligation on it to apply international law under the Convention.
Enforcement
As ever in international law, there are very few ways of judicially enforcing the law. The International Court of Justice has no power to enforce any judgement it makes. If the Court ruled that the treaty obligations stood, but New Ruristan refused to adhere to them, Ruritania would be reliant on diplomacy, soft power, and economic sanctions to enforce the existing treaty.
Sources
Article 16, Convention
A newly independent State is not bound to maintain in force, or to become a party to, any treaty by reason only of the fact that at the date of the succession of States the treaty was in force in respect of the territory to which the succession of States relates.
Article 34(1), Convention
- When a part or parts of the territory of a State separate to form one or more States, whether or not the predecessor State continues to exist:
(a) any treaty in force at the date of the succession of States in respect of the entire territory of the predecessor State continues in force in respect of each successor State so formed;
(b) any treaty in force at the date of the succession of States in respect only of that part of the territory of the predecessor State which has become a successor State continues in force in respect of that successor State alone.
- Paragraph 1 does not apply if:
(a) the States concerned otherwise agree;