Yes, you have to have an active RHEL subscription to download packages from RHEL's repositories. If your machine has never been subscribed, or the subscription is expired, you will not be able to use any of the repositories provided by RHEL.
Red Hat states, in relevant part:
If you choose to let all your subscriptions expire and have no other active subscriptions in your organization, you retain the right to use the software, but your entire environment will no longer receive any of the subscription benefits, including:
- The latest certified software versions.
- Security errata or bug fixes.
Entering a Red Hat Enterprise Linux 5 subscription number lets the installer:
Access the full set of supported packages included with the subscription at install time.
Automatically register the system to all Red Hat Network (RHN) channels included with the subscription at install time.
Many other examples can be found...
You can still use third party repositories; however, they often depend on packages in the base repositories provided by RHEL, and thus many packages will fail to install if those dependencies can't be satisfied.
The only way to install base packages without a subscription is to get them off the installation media.
If you're unable or unwilling to purchase a Red Hat subscription, consider migrating to CentOS to avoid the problem.