They would need electrolysis. Not for refining the titanium directly, but for preparing the other chemical agents needed for titanium refinement. Specifically, you need chlorine and either sodium or magnesium metal.
While in our world metallic titanium was only isolated in the early 1900s, as noted in Arkenstein XII's answer, the processes to isolate chlorine were invented in the late 1800s, and could've been managed much earlier if people knew how. Sodium and magnesium were isolated in 1807 and 1808, respectively. All of these processes, however, require electricity. Now, the Leyden jar was invented in 1746, which is 18th century, but that level of electrical expertise really wouldn't let you produce chlorine or sodium in any quantities useful for titanium production.
You could, however, take 19th century electrical knowledge and give it an earlier medieval aesthetic. After all, lodestone was known anciently, and medieval Europe certainly had the ability to draw copper wire. So, putting together a basic permanent-magnet generator is one of those things that absolutely could've been done in the background of otherwise-medieval technology if people just knew what they were doing.
So, the first bit of technology your dwarfs will need is just such an electrical generator: a few fixed lodestones arranged around an axle wound with wire, and spun with muscle power. They would also need to figure out commutators (sliding electrical connections that switch polarity every half-turn) to output DC. It needn't be very clean DC, but it does need to be DC! And if the dwarfs can figure out how to build a basic induction dynamo like that, it probably wouldn't be a big stretch to go on to designing a self-exciting dynamo, so they need only a very little lodestone to get it started. (Alternatively, in the absence of lodestone, they could build electrostatic influence machines to produce direct current with no need for a separate commutator.)
From there, there are two methods of producing the necessary chlorine: mercury electrolysis, and diaphragm electrolysis. The first, of course requires mercury, which was available anciently and can be refined from ore relatively simply, and the second requires asbestos, which is a naturally occurring material that they could mine.
In the mercury electrolysis method, you float a solution of sodium chloride (i.e., salt) over a pool of mercury, with anodes suspended in the solution around which chlorine will accumulate. The chlorine can then be contained in glassware, which is certainly within the grasp of medieval technology. The mercury acts as a cathode, and will need to be bonded to the generator with iron, nickel, or graphite leads, as copper, silver, or gold wires will end up dissolving in it. The liberated sodium combines with the mercury to form a solid amalgam, which is them reacted with water to produce sodium hydroxide and recover the mercury for re-use.
In the diaphragm method, you basically just need the salt solution flowing through an asbestos sponge, with an anode to collect chlorine on one side and a cathode on the other. That is simpler, but not as awesome. You end up with dilute sodium hydroxide solution as a byproduct, which can be boiled down to concentrate the sodium hydroxide.
Of course, these are dwarfs we're talking about, so maybe they want to go for a more brute-force method that makes better use of their forges: by mixing sodium chloride with calcium chloride, they can get a low-melting temperature salt which can be liquified in a furnace at a mere 600 Celsius, easily attainable in a Medieval blast furnace. Electrolysis then produces chlorine and pure sodium directly. If they can't acquire enough calcium chloride catalyst, though, producing it from salt and limestone is a rather involved process.
Now that the dwarfs have chlorine, they need sodium or magnesium. If they used direct salt electrolysis in a blast furnace, you've already got the sodium! If not, they either need to refine magnesium or sodium, which they could do from the sodium hydroxide byproducts of chlorine isolation.
If they can get sodium bicarbonate, then they can just brute-force their way to sodium by heating that in a furnace with coke or charcoal. But, they need electrolysis anyway for other steps, and they're going to be producing a lot of sodium hydroxide as a chlorine byproduct anyway, so might as well go with straight-up sodium hydroxide electrolysis. For that, you just boil down the alkali solution to get solid NaOH, then melt it down and stick in an anode and cathode--the anode collects sodium, and oxygen and water vapor are released as byproducts. The tricky bit here is that the temperature needs to be controlled very precisely, at about 330 C. Too high, and the sodium will dissolve into the melt; too low, and the melt will solidify.
Although refining magnesium would give them yet another magical metal to work with, it is comparatively more complex, so I'd probably just stick with the sodium. As a consolation prize, sodium can be used in the refinement of aluminum as well. (Of course, aluminum can be isolated via electrolysis, which is the modern way of doing it, but that requires cryolite, which is not a common mineral; on the other hand, maybe your dwarfs just happen to be sitting on their world's largest deposit....)
Now that you have chlorine and sodium, and titanium oxide or ilmenite ore, you can go about making your titanium!
Step one is to heat the titanium ore with coke or charcoal to about 1000 Celsius, and then blow chlorine gas through it. This produces titanium chloride and carbon dioxide gasses. The titanium chloride can be condensed for liquid storage (it boils at 136 C), but care must be taken to keep it absolutely dry, as it will react with water to produce titanium dioxide (wasting your work!) and HCl gas, which is not nice to breathe!
The titanium chloride is then mixed with molten sodium in an anoxic atmosphere; modern processes use argon for this, but hydrogen ought to work as well, and producing hydrogen with medieval technology ain't hard; they can electrolyze it, or if you don't want to use electrolysis for just everything because it does kinda mess up the low-tech aesthetic, just pass superheated steam over charcoal. The TiCl4 + Na mixture should be preheated to about 500 Celsius, but after that the reaction is exothermic, so the reaction chamber needs to be able to withstand over a 1000 degrees (which, if you've gotten this far anyway, shouldn't be a problem). You then just let it sit for several days, and then cool down for several days, and then eventually you crack the reaction vessel and pull out pure titanium sponge and salt, which can be washed off with water (and recycled back into chlorine and sodium!)
Now, that just gets it refined. Actually forging it once you've got a sponge of the pure metal is a tricksy skillfull process, but can be done in a regular blacksmith forge.
Apparently, it is also possible to produce titanium continuously in a stream process, in which titanium chloride vapor is bubbled through a stream of liquid sodium, and the solid titanium and salt are then filtered out and the sodium recirculated. I have no idea how feasible the equipment for that would be to set up with otherwise medieval technology, though.
If the dwarfs can acquire calcium chloride, however, it appears that there is a tricksy way to turn titanium dioxide directly into metal through electrolysis without having to deal with nasty elemental chlorine: the titanium ore is powdered and then pressed into pellets or rings which can be attached to a cathode, and then immersed into a bath of molten calcium chloride with a consumable carbon anode. This results in calcium reacting with the titanium ore to strip away the oxygen, then re-combining with chlorine in the melt while the oxygen reacts with the carbon anode, producing titanium metal and carbon dioxide.