I have previously installed the hdf5-devel 1.8.13 CentOS rpm in RHEL because I needed it to build two R packages but I would recommend against doing so especially with Fedora rpms.
In your case, there is already a docker RPM for RHEL. Installing Fedora rpms in RHEL can break it as they may have dependencies which you'll also have to install and that can cause dependency hells because other packages will be looking for the RHEL version but you'll have the Fedora version installed. Also, Fedora (and CentOS) rpms are not supported in RHEL.
Also, the EPEL repo is only for CentOS and RHEL. It's not available for Fedora. If you want to see which repo a package comes from, use this command:
yum whatprovides package-name
In the Fedora/RHEL/CentOS family, you can also see the names of the repos in
/etc/yum.repos.d/. The repos for each distro will be called or begin with:
Along those lines.