Regular USB thumb drive rubber-ducky?
I was wondering if I could put some sort of file in the root directory of the thumb drive that would turn it into one.

No this wouldn't work
Auto-running applications is not supported in macOS (see stackexchange question How do I automatically run an application on USB attach or CD insert on Mac OS X?).  You would need to persuade your target user to run a program/script in which case it is just a program/script and nothing like a rubber ducky.
A rubber ducky only looks like a USB - it simulates keyboard input through hardware. Hak5 describe history of USB RUBBER DUCKY here:

Did you know the first USB Rubber Ducky was invented by Hak5 founder Darren Kitchen while working as a sysadmin?
Tired of typing the same commands to fix printers and network shares again and again, the device evolved out of laziness.
He programmed a development board to emulate the typing for him - and thus the keystroke injection attack was born.
Needing a case - a miniature bath time friend, the rubber ducky, was requisitioned.

and current version is

Featuring a fast 60 MHz 32-bit CPU, convenient type-A USB connector, Micro SD expandable memory, programmable payload replay button, JTAG interface with GPIO and DFU bootloader