It’s going to be a bit of a Rube Goldberg like device but theoretically yes.
Install Tasker on the Android device as well as the AutoRemote plugin. Configure a task and profile to respond to messages from AutoRemote and adjust the volume based on the contents of the message.
IIRC, you can issue AutoRemote messages through an HTTP call so you should be able to configure the HTTP binding or HTTP actions from a Rule to publish the volume messages. It’s been years since I’ve done this sort of thing with Tasker and AutoRemote so it might not work any more. But that is what I’d look at first.