How do I add read/write permissions on a directory for an SQL Server account
The rights need to be provided to the SQL Server Service Account, which is typically an Active Directory account setup specifically for SQL Server to use.   Microsoft has a great Docs page that describes Service Accounts for SQL Server.

Check with SQL Server Configuration Manager to determine the name of that account.

Assign rights to the temp folder for that account.

In the image above, you can see SQL Server Express is running under the NT AUTHORITY\NetworkService account - any account that begins with NT AUTHORITY is an account local to the machine running SQL Server.