Lava is a "hot fluid" . The technology to handle the "liquid" part is obviously available during medieval era, as irrigation is already known for centuries. For example, the first dutch polder was build from 1609 to 1612 with windmills. Digging a hole somewhere so that it can thereafter be filled with liquid is really not a challenge. Organizing the liquid flow is not a complex issue either.
That said, the "hot" part is more tricky. The area where the lava flows must resist the high temperatures, and no technology is available to protect people once the lava is in place. So this may lead to some adaptations :
- high-temperature resistance rock must be used to contain the lava. Alumina rich clay are the best option and are used nowadays for this, but granite probably should work. A warning if you use porous rocks : they may break or explode if the water they contain is not removed previously (slowly heating them beforehand may do the job).
- immediate surroundings will be permanently exposed to the heat. A bridge will get very hot and end up not being usable, for example.
- non-immediate surroundings will receive energy as lava flows continuously. The whole area must find a balance. This may require adding of cooling systems, but this will be complex : water can carry heat but do not mix well with lava and will create breaches in your defense system.
On the overall, this is achievable if you have good engineers and a stable flow of liquid lava. However the resulting place will be hot and hard to enter, even if friend. Depending of the land size, it could end up in a tropical paradise (if you do it around a mountain, for example), or a balrog™'s lair...
In practice, the area close of the lava may look like hell (which can obviously be cool!), with red-glowing borders reaching high-temperature from the surrounding lava. Expect air to be filled with some toxic and stinking smokes due to sulfur, and nearby waters to become acid, not drinkable, but eventually colorful like the Kelitumu lakes. Most animals will leave, and nearly all plants die. Your visitors may be reluctant to come by...
One last thing : should your lava supply vary, or its fluidity not be top-quality, the lava will solidify in your structure and it will be another nightmarish hell to repair it and make it work again.