While I believe it is possible to configure the Raspberry Pi to be a WiFi access point on the network the ethernet cable is connected to, I left finding the right "how-to" and implementing it as an exercise for @ilcristofer with the assumption that the skills to do so exist.
I believe I have the skills to do so but not the need or the desire. If I did have the need, I would NOT use the Raspberry Pi running OctoPrint to do so. I'd purchase a cheap WiFi router (one that also included a couple of wired ethernet connections), a short ethernet cable (optional) and then move the ethernet wire currently connected to the Pi to this new router and either connect the Pi with WiFi to this new router or connect it with the short ethernet cable.
BTW, this new router should probably be configured as an access point because that is what is needed here. Every router I've ever used could be configured this way. You could, of course, purchase a WiFi access point, but they are usually much more expensive than a router that can do the same thing with a couple of minutes of configuration.
This implementation separates the load of handling the WiFi from the load of driving the printer. If the Raspberry Pi has too many compute cycles subtracted from the printing process, the print job could fail. It allows for things like watching a streaming video on your smartphone while keeping "one eye" on the print job.