Thanks for reaching out to Q&A.
Using ldap in functions is actually complicated and there might be some restrictions. From a networking perspective, you need to create a hybrid connection using expressroute or atleast a point to site connection to access an on-prem resource. When you have successfully configured the hybrid network connectivity, then comes the restriction on LDAP.
Things you cannot do with Hybrid Connections includes Support LDAP, because it can require UDP. Please refer : https://devblogs.microsoft.com/premier-developer/using-azure-app-services-with-hybrid-connections/#things-you-cannot-do-with-hybrid-connections
I would suggest you to host your .net application in a VM and access the on-prem Active directory using LDAP over SSL.
Please see a similar discusssion here: https://stackoverflow.com/questions/49196898/azure-app-service-active-directory-authentication-access-denied/52633900#52633900