How to undo deregister script and use local versions?

If that code is written into the theme just like that– that is, it isn’t hooked into wp_enqueue_scripts like is should be– then you can’t “undo” this without hacking the theme.

I should add that if the theme has this code in functions.php just like that and not hooked then the theme is doing it wrong and if you had debugging enabled you’d see this:

Notice: wp_deregister_script was called incorrectly. Scripts and
styles should not be registered or enqueued until the
wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts
hooks. Please see Debugging in WordPress for more information.

You need to remove the code and (possibly) add this:

function enqueue_scripts_wpse_110500() {
  wp_enqueue_script('jquery-ui');
}
add_action('wp_enqueue_scripts','enqueue_scripts_wpse_110500');

With that code, WordPress should load jQuery itself automatically.

I would advise against using a theme that is doing something so fundamental as this incorrectly. No telling what other sloppiness there is in the theme.