There could be dozens of reasons why it may not work. You will only find out when you try.
Yes El Capitan can be installed on that iMac, you used a USB you already had, but if this had been
created before October 2019, it would fail because the certificate for it has expired, that is mentioned
earlier in my first post.
You can download El Capitan with the new certificate from here,
(you do not need to reset the date and time for this method)
How to upgrade to OS X El Capitan – Apple Support
Go to Section 4 and click on Download OS X El Capitan.
This downloads InstallMacOSX.dmg to your Downloads folder.
The next section can only be done on a mac that is capable of running El Capitan,
a mac that came preinstalled with an OS later than El Capitan will refuse to do the next bit.
When downloaded open to InstallMacOSX.pkg, double-click on
that and an installation window will open, this does not install El Capitan
but converts the InstallMacOSX.pkg to the Install OS X El Capitan.app which
you will find in your Applications folder, it should be 6.2GBs in size.
(If the installation window asks which disk you want to install to, you must pick
the disk that you are booted to at the time. Not any internal or external disk that
you want to eventually install El Capitan on, that is for later.)
Now you are ready to create a bootable USB installer disk using the Install OS X El Capitan.app
in the Applications folder and the createinstallmedia command in the Terminal app.
Read the instructions here,
How to create a bootable installer for macOS – Apple Support
Get a very long Ethernet cable or move the mac closer to her router, as said before WiFi has a habit of
changing the date back to today.
If you manage to redeem the Lion installer then you will need to create a bootable USB so you can transfer it
to your friends iMac. In order to do that you may have to seek out a copy of the old Lion DiskMaker or DiskMaker 3,
https://diskmakerx.com/download/ and hope it still works. You do not need to reset the date and time using this method.