Yes, if the screen sharing session allows remote control, you can control the shared screen as if you were physically using the remote Mac.