How to set “lang” attribute for post/page title?

There is a the_title filter. You should be able to wrap the title in a <span> using that.

add_filter( 
  'the_title', 
  function($title) {
    return '<span lang="ur">'.$title.'</span>';
  }
);

A version compatible with an older PHP:

function lang_attr_wpse_116733($title) {
  return '<span lang="ur">'.$title.'</span>';
}
add_filter('the_title','lang_attr_wpse_116733');

If it were me, I’d add a checkbox on the post edit screen somewhere and then wrap both the title and the post body with a <span> or <div> based on that single checkbox.