These humans must never see the ocean and should still be able to survive. They can only get out of the land if they improve the technology level. Is it even possible? The lakes or seas should probably not be connected to the ocean because otherwise the humans can just follow a river to go out of the land. So the inland bodies of water just evaporate at the same rate as water is added to them. Medieval humans can surely cross mountain ranges right? If volcanoes are surrounding them, can't they just wait till the volcanoes stop erupting then cross it while it's cool? I'm looking for a way that's natural and using geology.
It won't be easy, but I can think of a few possibilities, though they require rather unlikely geography.
Large, circular valley: You have this large valley surrounded by tall mountains from which rivers run into a central system of lakes. There is a balance between evaporation and added water, or maybe there is an underground river that drains the lakes. Such a valley is unlikely to arise from tectonic action, but there are other options.
One is a giant impact crater. The largest verified impact crater on the Earth is the Vredefort Crater in South Africa at 300 km across. It is more than 2 billion years old, so not much of the crater rim remains, but a fresh crater a little bigger could cold a region of 50-60,000 square kilometers, a bit larger than Denmark. While the crater rim can be quite steep, it isn't likely to be all that tall, however, so intrepid mountain climbers could feasily cross it with medieval equipment.
Another is a glacial valley. When the ice withdrew after the Ice Age, some large lumps of ice were left behind and slowly melted into deep lakes. A particularly large glacial valley might do the trick, especially if the central lake drains through an underground river. When the Greenland Ice fully melts, a large part of the interior will be such a lake or inland sea (see map). Again, the rim mountains are unlikely to be unsurmountable.
Highland plateau: It is possible to have a rather flat highland plateau with very steep sides that make it difficult to descend - think Jules Verne's Lost World on a larger scale. Constant, heavy mists may obscure the land below, making it look like the world consists of nothing but the plateau in an endless mist.
Polar volcanic region: This may be the most likely (or least unlikely) solution: You have a verly large polar continent (think Antarctica) with a large, volcanic region in the middle. This region is heated by geysers and hot lakes and is made fertile by volcanic ash. It may be in a low valley or system of valleys that helps retain the heat. If you leave the region, you will have to cross hundreds of kilometers of frozen wasteland to get to the sea.
Neither of these geologies are at all likely, but could be feasible. It would help if the region is being deliberately isolated by a very high-tech civilization that could build up rim mountains and in other ways make leaving the region difficult.
Mudflats. Their island/continent, which is nowhere more than a few feet above sea level, is completely surrounded by miles of sticky mudflat. The tides are so slight that any point they can reach from solid ground is never covered by more than inches of water, preventing use of even shallow draft boats. Any attempt to cross the flats on foot or with land vehicles results in getting stuck. Rivers spread out into wide, shallow deltas, and soak into the mud, with no channels reaching the ocean.
Hovercraft could cross the mudflats and reach open water with no trouble at all, once they develop them.
A large enough desert with no water sources would be impossible for medieval humans to cross. An extreme enough mountain range would also be close to impossible, especially if there are no passes. You could put the humans on a piece of land bounded on some sides by desert, and some by mountains. They would get their fresh water from these mountains, but the ocean could be on the other side of the mountains and deserts.
Instead of trapping the humans on a valley floor surrounded by mountains how about having your medieval humans trapped on top of a tepuis. A tepuis is a mountain range with a flat plateau on the top and sheer cliffs all around the sides typically found in South America.
The sheer cliffs that surround the plateau would make it incredibly perilous for a medieval person to try to descend the plateau while at the same time geographically these tepuis receive a large amount of rain and can have magnificent waterfalls off their edges so there is fresh water available and vegetation as well as some rare animal life. See this wikipedia entry or this national geographic documentary for more on tepuis.
There are many types of terrain that would have presented a barrier to medieval people. Although mountains could be crossed via passes, mountains were seen as dangerous places and were generally avoided if at all possible. Very tall mountain ranges such as the Himalayas would have presented formidable obstacles especially if the passes were snow bound and or there were a lot of glaciers present.
Hot deserts and Badlands might also be difficult or impossible to cross especially if there are no oasis or water sources.
If you want to make the journey even more difficult I suggest that these medieval people had no beasts of burden like donkeys, mules, horses or oxen. That would make long trips even more difficult as they were for the ancient Maya.
Your scenario has a big problem: Trapped lakes will in time become saltwater lakes. Instead, you want your water to drain through the ground.
You'll need some high, steep mountains to surround the area. They are volcanic but not explosive so they keep building up rather than blowing themselves to bits. The passes are upwards of 20,000' and thus extremely dangerous for the inhabitants to cross at that technology level.
Now, if you will accept containment other than geology: They are on a highland plateau. In the surrounding lowlands there's a very small insect that carries a very lethal disease. (It's small enough it's bites aren't noticed so they don't know to defend against it.)
Probably not the direction you want to go, but if you make the land rich, fertile and with no big hazards (no typhoons, no quakes, no volcanos, no sudden floods, no draughts), humans would have less reasons to move somewhere else.
Sort of an ancient Egypt like land, but on an island to prevent expansion wars, which require travels.