If you don't have a neutral wire in the power cord, then you should use a transformer. You say 22 mA so that works out to a 2.53 VA transformer. By coincidence I just purchased one that is probably what you need:
Hammond 229 series
229A230
6 VA
Primary: 115/230 VAC
Secondary: 115/230 VAC
50 ma @ 115 VAC
Mouser pn: 546-229A230
$16.84 / 1
Be aware that there could be a question of the REFERENCE level in the two circuits (the VFD and the tachometer). It is possible that the VFD is operating between the two live lines with no connection to neutral. So one of the hot power leads may be the effective reference (sometimes called ground reference). While the 115 VAC, tach circuit would use only one of those hot lines and NEUTRAL which is grounded at the point where it enters the building. This means that there could easily be a 115 VAC difference between the reference or "ground" level of the two circuits. If that is so, then connecting a "ground" cable between the two may result in fireworks.
Using a transformer will completely isolate the tach circuit from the power line ground and allow it to operate with whatever reference ("ground") level that the VFD circuit uses. A well designed VFD would provide isolation (optical?) at the tach input. But you have no guarantee of that.
If you do not use the transformer, unless you absolutely know that the tach input is isolated, I would strongly recommend that the tach circuit be isolated from any grounded point (like the frame of the machine) when it is first powered up and a measurement be made from it's ground to an actual earth ground, like the frame of the machine or of the VFD. If you see 115 VAC or some other significant Voltage there, then connect a large value resistor across the meter leads, perhaps 100 KOhms and see if that Voltage comes down. Then try a smaller resistor, like 10 KOhms and see if it comes down even more. Then 1K, 100 Ohms, and 10 Ohms. By that point you should see almost zero Volts, indicating that there is not any great current flowing between the two circuits (tach and VFD) and know it is OK to install the tach on the machine. If the Voltage does not come down to near zero, then you have a problem and should use the transformer for sure.