Although they share the island of Ireland, the Republic of Ireland and Northern Ireland are separate political entities — the former is a sovereign country and the latter is a part of the
United Kingdom — and there is an international border between the two countries.
The good news is that many car rental companies allow bringing a rental car across the border (albeit usually for a higher fee than for one-way rentals inside the Republic of Ireland). In fact, the route between Dublin and
Belfast (the capital city of Northern Ireland) is immensely popular and thousands of tourists make the two-hour long drive every year using the opportunity to see both cities on the same trip. Belfast has two international airports —
Belfast Airport and George Best Belfast City Airport. Both are convenient locations for picking up your ride at the beginning of your trip or dropping it off at the end.
The United Kingdom's withdrawal from the European Union (or Brexit) raised fears that a "hard border" might be implemented between the two countries. However, these proposals were rejected. Despite the fact that the Republic of Ireland remains a member of the EU while the United Kingdom no longer is, there are no physical border checks in place between the two countries, and the border remains fully open for travelers. Do keep in mind, though, that by crossing the border you'll be visiting two separate countries with different visa policies, so make sure you don't need a visa to visit either the Republic of Ireland or the United Kingdom (this applies to visitors from certain countries, for example, Russia, India and China — despite there being no border in place, you'll still need a separate visa for visiting each of the countries as not having one can lead to deportation).