You can change or use any available for your internal application while specifying internal URL, however, for Azure AD app proxy service you cannot make changes to ports it requires to communicate.
Azure AD Application Proxy connectors connect to Azure via HTTPS (TCP Port 443) and HTTP (TCP Port 80).
Open the following ports to outbound traffic.
80 Downloading certificate revocation lists (CRLs) while validating the TLS/SSL certificate
443 All outbound communication with the Application Proxy service
Please let me know if this help !