There are various image php rotator scripts available on the web.
Your best option is to create a child theme, create a folder in that theme that contains your header images, set the script to point at that folder, and then set your header’s background image to point at that script in the style sheet.
I have done this on hand-coded sites many times, but I have never tried it in WordPress.