Yes, and no, with a small caveat.
Generally, this will work, and is perfectly safe (albeit considerably slower than using an USB 3 cable).
However, note that some disks require use too much power for USB 2.0 to be sufficient. While the amount of power that you can draw from USB 3 is quite amazing, USB 2.0 is kinda puny in that respect. There are disks which aren't happy with that.
This is still "safe" operation insofar as there is no way you could damage the disk (or the computer) by doing so, but it is not safe insofar as writing data might not be 100% reliable. Actually, it should either work or not work (in particular because spinning up successfully takes the most power), but you cannot be 100% sure. Writing does use more power than idling, and you never know for certain what goes on when a device is slightly under-powered. Generally, though, no worries. Usually it just does work or doesn't, so you can easily tell (all or nothing!), and most modern disks will be in the "just works" camp.
A workaround that is sometimes applied is using a Y-cable which sucks power from two USB 2.0 ports (but only uses one to transmit data). This is strictly a violation of the standard, but it "works fine".
Of course, this is only an applicable solution if you already happen to have one of these lying around (and maybe don't know what they're good for?) because a Y-cable is more expensive to buy than a proper USB 3 cable which will work within the specification and at USB 3 speed...
3
@RicardoS. See grawity's answer, the extra connectors bring extra transmission lines. So it will work, albeit at USB 2.0 speeds. http://pinoutguide.com/PortableDevices/micro_usb_3_connector_pinout.shtml
– Daniel F – 2018-11-20T08:58:26.227