It depends on what one means by intervention: going between antagonists to facilitate talks so that they could peacefully resolve their differences, or military involvement? Does Eritrea have the legal right to intervene in Etiyopiya? Or should it stay always hands off and neutral? Peaceful intervention (facilitating direct negotiation, offering good offices, mediation, encouraging investigation and conciliation, judicial settlement, arbitration, etc.) is often desired and military intervention is often prohibited.
Similar to the principles of the UN, the African Union Constitution, Article 4 prohibits intervention of one State but allows the AU to intervene in a member State,
https://au.int/sites/default/files/page ... act_en.pdf(g) non-interference by any Member State in the internal affairs of another;
(h) the right of the Union to intervene in a Member State....
(j) the right of Member States to request intervention from the Union in order to restore peace and security.
Article 2 of the ASEAN Charter affirms:
https://asean.org/storage/images/archiv ... harter.pdf(e) non-interference in the internal affairs of ASEAN Member States;
(f) respect for the right of every Member State to lead its national existence free from external interference, subversion and coercion;
However, there are some States that prohibit intervention of any type. For instance, Article 19 of the Charter of the Organization of American States says that,
No State or group of States has the right to intervene, directly or indirectly, for any reason whatever, in the internal or external affairs of any other State. The foregoing principle prohibits not only armed force but also any other form of interference or attempted threat against the personality of the State or against its political, economic, and cultural elements.
http://www.oas.org/en/sla/dil/inter_ame ... er_OAS.asp
The United Nations Charter strictly limits the right of intervention of a State in the internal affairs of another State, by force or other means. Accordingly, military intervention by an individual State is not permissible under the United Nations Charter except in the following circumstances:
(1) Force may be used in self-defense under Article 51 of the Charter. This Article may also be used by states to collectively prevent the spread of hostilities or to restore peace and security;
(2) Intervention may be employed to implement an order of the U.N. Security Council or the General Assembly to remove a threat to security or to restore peace;
(3) States may collectively intervene under regional arrangements such as the African Union where the objective is to restore peace and security to an area threatened by violence;
(4) A state may legitimately intervene to assist the government of another state in repressing subversive activities if requested by the legitimate government of the state in question to assist.
https://www.un.org/en/sections/un-chart ... full-text/
The Federal Government of Etiyopiya seems already prepared and fairly strong enough to repress internal sources of violence and instability. Most likely, there is no need for Eritrea to militarily intervene in Etiyopiya anytime soon, unless situations change drastically. If there is a need for intervention, does Eritrea have a legitimate right (in terms of international law) to intervene in Etiyopiya?
Eritrea may use force in self-defense against any hostilities that may originate from Etyopiya, but ought to inform the Government of Etiyopiya to get its consent, and the UN Security Council, before it takes (or immediately after) any such action. They may help in removing the security threat(s) to Eritrea.
Given the 2018 Peace Agreement between the two countries, the most likely scenario that Eritrea may legitimately intervene militarily in Etiyopiya is in the case of the 4th circumstance stated above---i.e. to assist the current legitimate National Government of Etiyopiya, if requested, to repress subversive activities within Etiyopiya and assist to control the spread of violence as well as to maintain normal peace and stability. If so, Eritrea needs to inform the African Union and the UN Security Council (and may be consult with IGAD and the foreign diplomatic corps in Eritrea) before it rushes in to intervene.
Everyone really needs to note that, though it could legitimately intervene in Etiyopiya, if and when invited in by the Federal Government of Etiyopiya (both the UN Charter and the AU Constitution Act seem to approve of preventing a current government not be overthrown through violence), Eritrea doesn't have to intervene militarily, unless it is an absolutely necessary step to take for both Etiyopiya, Eritrea, and the region. I don't think that that time is now.