All you need to do is use AD Connect to sync the attribute to Azure AD. E.g. you can sync your on-prem CustomAttirbute as ExtensitonAttribute1 in Azure AD. Once the attribute value is populated in Azure AD, you need to navigate to below path and add new claim as shown in the screenshot below:
Azure Portal > Azure Active Directory > Enterprise applications > You_application > Single sign-on > SAML-based Sign-on > User Attributes & Claims > + Add new claim
Once this is done, your enterprise application will receive CustomAttirbute claim in the token and the value of the claim will be the value populated in ExtensitonAttribute1.
Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.