Yes it could be set up that way.
You would probably look up the rate in a table and set a session variable. Then use that session variable to determine whether to use the local rate or the rate from ups by creating two shipping charges that key off the session variable value.