Yes indeed, given that the VFD is sized correctly. Wye or delta doesn’t matter, a motor rating is what’s important.
The difficulty of using a VFD is that the normal equipment controls must now be rewired or added to go to the VFD as control inputs…thinking forward/reverse, speed control, etc.
Yes indeed, you are right. One might sometimes get up to changing wye or delta when it is about matching to the motor capability. Changing to delta, for example, might be overworking a motor that was already at it's limit. If starting from 220V or 240V input to the drive, machine 3-phase motors in wye configuration would be unable to deliver full power using a artificial PWM switched 3-Phase, unless changed to delta configuration. This takes advantage of the motor drive's ability to deliver the current, even starting from a lower bus voltage.
Regarding the controls. For those who want the existing buttons and knobs to do exactly what they did before, it is usually possible to make their contacts work as before, by using their contacts to deliver low voltage or groundings as logic inputs to motor controllers. This can be 24V, usually DC, but sometimes can be 24VAC from a step-down transformer, or sometimes 5VDC. Most logic inputs are already biased, only needing to be grounded by a switch in it's new role.
[EDIT: Warning! DO NOT use existing switches to try to swap two output phases to the motor wiring as way of "reversing" the motor.
This means do not connect the drive to the wires where the power "used to go", via contactors and switches.
The cable from drive electronics U, V, W to motor must be direct, and have nothing else else in it's way.
Disconnecting and reversing a controlled motor in full flight is a violent abuse of the electronics, likely to result in an overcurrent fault, if not simply ending up damaged and unresponsive forever! You can easily command super-sweet reverse from the same switches, but let the internal software do it for you!]
There are, of course, all the new standard features, like variable speed control to faster and slower than before. There is acceleration up to to speed soft start, and deceleration to stop in a controlled way. This can have it do extremely fast braking, yet to a smooth, non-violent stop, assisted by a braking resistor that one can usually provide, if not already built-in. Going from full forward to full reverse in a controlled way without over-stressing anything becomes easy. Either add in the switches/knobs for the new features, while retaining what the original switches do, or go for an entirely new control arrangement.
One thing to consider well is how low speed can you go while still at full torque. Modern switched electronics with current sensing can deliver huge torques into permanent magnet motors, even at stall, but if the plan is to keep a original squirrel-cage induction motor, there may be limits to it's compatibility with being driven by a switch mode contrived artificial AC. The way the rotor becomes magnetic works better if it is at least allowed to spin some. If the machine has belts or gears that were used for speed changes, choose one that has a lower gearing, to have the motor reasonably spinning, even if the VFD has slowed the spindle down to slower than you ever saw before.
At the other end, making a drive "go faster" than the original phase rotation speed is also possible, but keep it sane. Don't go exploring motor speeds that will mess up on the design limits of bearings and other bits. Usually, VFDs that are sold as VFDs intended to work existing machine motors are already default configured to suit the norms.
Finally, regarding the connecting up. Appreciate that this is no longer a sweet sine-wave AC going to the motor. It is a high audio frequency switched-carrier, pulse-width modulated horror, full of high frequency transients. This is fast switching of high currents! Use the screened cable, if possible one with symmetric layup conductors. If there are common-mode suppression ferrite toroids included, do not forget to mount them on the cable. Connect exactly as specified in the manual. Just because "the motor turns", is not enough! If it shows the screen grounded only at a provided point on the drive, then only do it there, and nowhere else. If the motor squeals, the carrier frequency parameter is set too low. Set as high as you can, keeping in mind the length of the cable. Normally done from a configuration parameter, I have found 8KHz, or better, 12 KHz or so makes them go quiet, even on a 25m run. Getting the screening wrong can upset it's controls. It can mess up other computer-based stuff on the same power, and cause the father and mother of RF interference to everything!