Connect to SQL Server on premise

I have a REST API using DreamFactory deployed on Azure. Can the REST API connect to the SQL Server on premise?

As long as your on-premise SQL Server is publicly available and accepts remote connections from your Azure server and the user credentials you authenticate with are set up for remote access, yes.