Until 2021, cabotage transportation (i.e. between Ukrainian ports, including as part of international transportation) was reserved to vessels under Ukrainian flags, unless a special permit was issued by the State Inspectorate for Maritime and Inland Water Transport Safety. According to Article 32 of the Merchant Marine code, only vessels owned by Ukrainian citizens or by a Ukrainian legal entity whose shareholders were all Ukrainian citizens could fly the Ukrainian flag. Foreign vessels hired by Ukrainian citizens under a bareboat charter arrangement could fly the Ukrainian flag for the duration of the arrangement. 
Since 2022, the right to sail under the State Flag of Ukraine can be granted to a vessel owned by a legal entity registered on the territory of Ukraine, regardless of the nationality of its owners, except where shareholders and/or ultimate beneficiaries are from a state recognized by Ukraine as an aggressor state or an occupying power, and/or are natural and legal persons to whom special economic and other restrictive measures (sanctions) have been applied in accordance with the Law of Ukraine on Sanctions.
"Article 32. National ownership of the ship. The right to sail under the State flag of Ukraine
The term "Ukrainian vessel" or "vessel of Ukraine" means the national ownership of a vessel over which the jurisdiction of Ukraine extends.
The nationality of the vessel is determined by its state registration in Ukraine and obtaining the right to sail under the State flag of Ukraine.
The right to sail under the State Flag of Ukraine belongs to a vessel that is owned by a natural person - a citizen of Ukraine, a natural person - an entrepreneur, a legal entity registered on the territory of Ukraine, or a vessel used by the specified persons under the terms of a bareboat charter contract (except for vessels owned by or shipowners of which are citizens of a state recognized by Ukraine as an aggressor state or an occupying state, legal entities registered on the territory of a state recognized by Ukraine as an aggressor state or an occupying state, legal entities registered on the territory of Ukraine, participants (shareholders, members) or whose ultimate beneficiaries are citizens of a state recognized by Ukraine as an aggressor state or an occupying power, or legal entities registered on the territory of Ukraine, participants (shareholders, members) or ultimate beneficiaries of which is a state recognized by Ukraine as an aggressor state or an occupying power, natural and legal persons to whom special economic and other restrictive measures (sanctions) have been applied in accordance with the Law of Ukraine "On Sanctions").[Article 32 as amended by Law No. 1054-IX dated 03.12.2020]
[...]
Article 131. Cabotage transportation
Transportation between ports of Ukraine is carried out by vessels flying the State flag of Ukraine, as well as by vessels flying a foreign flag (except for vessels flying the flag of the aggressor state and vessels owned or shipowners or participants (shareholders, members) or ultimate beneficiaries of the owners or shipowners of which are citizens of a state recognized by Ukraine as an aggressor state or an occupying state, legal entities registered on the territory of a state recognized by Ukraine as an aggressor state or an occupying state, a state recognized by Ukraine as an aggressor state or an occupying state, physical and legal persons to whom special economic and other restrictive measures (sanctions) have been applied in accordance with the Law of Ukraine "On Sanctions").
{Article 131 as amended in accordance with Laws No. 5502-VI dated 20.11.2012 , No. 1054-IX dated 03.12.2020 }
Article 132. International transportation
Transportation between ports of Ukraine and foreign ports can be carried out both by vessels flying the State flag of Ukraine and, subject to reciprocity, by vessels flying a foreign flag. [...]" (Merchant Marine Code (№ 176/95-BP of 23.05.1995), as amended by Law № 1054-IX of 3.12.2020, in force as of 1 January 2022 [google translation])
--------------------------
Previously
--------------------------
"Article 32. Nationality of the vessel. The right to sail under the State flag of Ukraine
The term "Ukrainian vessel" or "vessel of Ukraine" means the nationality of the vessel to which the jurisdiction of Ukraine extends.
The nationality of a vessel is determined by its state registration in Ukraine and obtaining the right to sail under the State Flag of Ukraine.
The right to sail under the State Flag of Ukraine belongs to a vessel that is state-owned or owned by a natural citizen of Ukraine, as well as a legal entity in Ukraine founded exclusively by Ukrainian owners, or a vessel owned by these persons under a bareboat charter agreement.
[...]
Article 131. Cabotage transportations
Transportation between the ports of Ukraine is carried out by vessels flying the State flag of Ukraine, as well as vessels flying the foreign flag, subject to obtaining permission from the central executive body, which ensures the formation of state policy in the field of transport.[...]" (Merchant Marine Code (№ 176/95-BP of 23.05.1995), last amended by Law № 440-IX of 14.01.2020, Articles 32 and 131 [google translation])
Merchant Marine Code (№ 176/95-BP of 23.05.1995), as amended by Law № 1054-IX of 3.12.2020, in force as of 1 January 2022 [google translation]
Merchant Marine Code (№ 176/95-BP of 23.05.1995), last amended by Law № 440-IX of 14.01.2020
[<a href="https://zakon.rada.gov.ua/laws/show/176/95-%D0%B2%D1%80#Text">Code</a>],[<a href="https://zakon.rada.gov.ua/laws/show/176/95-%D0%B2%D1%80/ed20211219#Text">Code</a>]