Welcome to Microsoft Q&A! Thanks for posting the question.
Python functions are supported on the Linux OS in azure. The current directory is indeed read-only and if you want to create the temporary file then you need to create it in the temporary folder.
import logging
import azure.functions as func
import tempfile
from os import listdir
#---
tempFilePath = tempfile.gettempdir()
fp = tempfile.NamedTemporaryFile()
fp.write(b'Hello world!')
filesDirListInTemp = listdir(tempFilePath)