Of course it will work. Many things work on the bench, when you make one, but show problems over time.
There are ways that "work" but that hide unreliability and will leave you unsure when intermittent or unexpected operation occurs.
The problem here to consider will be interference between the motor and the Arduino, which is best handled with filtering.
What will you be powering it with? What will you use to switch power to the motor? Some of the available motor drivers will already have reverse EMF pulse suppression and some filtering.
- How much current will the motor draw?
- How are the Arduino controls getting to the motor driver?
This matters because the ground reference for the signaling matters, and the ground currents from the motor driver will introduce noise in the ground reference. If strong enough, it will interfere with the control signals from the Arduino, perhaps yielding sporadic operation, oscillation, and excess heat disipation.
Although in software we often say "there is only one way to be right", in hardware, there are many ways to appear right, but be unreliable, break down too soon or not work over temperature, supply voltage, or component variation. In the art, this is called "PVT", process (or component), voltage, and temperature variation. Making sure that the design works over the required PVT range is critical for building something you can depend on.