Ukraine is right, if country is attacking country B from Country C’s territory, then Country C is forced to react.
Exactly. If country A is attacking country B from country C’s territory, then Country C becomes a target for B.