Execute a function or call a function as a specific user?

Execute a function or call a function as a specific user?

Since we are not able to explicitly set Added_User (record ownership) in script, is there a way to execute a function or to call a function and have it execute as if it was being executed by a specific user?