URL Manager rule should look like this:
'forum/<title:\w+>/thread/<id:\d+>' => 'forum/thread', //make sure this is listed first so it has priority
'thread/<id:\d+>' => 'forum/thread',
Then in your controller you would have this:
public function actionThread($id,$title=null) {
//$title will contain title from url if sent
}