I came across this thread when I was searching for some help getting the docker-stats application module working, but I found that I was still getting permission denied messages. The aforementioned thread mentioned that Docker had 660 permissions on its socket, which made me realize there may be one other step to perform to get this working.
Looking at this site, I realized that not only did I need to allow the script to execute as sudo, I also needed to add the Debian-snmp user to the docker user group. So I ran
sudo usermod -a -G docker Debian-snmp
And restarted the snmpd service with
sudo systemctl restart snmpd
And voila, I have graphs in LibreNMS for my docker containers!
Just wanted to share this in case it helps someone else.