The undefeated fighter extended his record to 10-0 (six knockouts) with judges' scores of 115-114, 115-114 and 115-113 over his compatriot, whose left eye was swollen completely shut by the end of the fourth round.
Despite taking the first two rounds, Yaegashi struggled to maintain that control as the eye worsened, swelling significantly, and Ioka looked for a seventh stoppage in the championship rounds.
The 29-year-old, however, refused to cave in and went the distance in a third professional defeat (now 15-3, eight KOs) in which he was merely outlasted by the WBC incumbent.
Yaegashi contested one of the fights of 2011 with Pornsuwan Porpramook and even in defeat to the 23-year-old has raised his profile with another engrossing battle.
Ioka said after the bout: “I really appreciate the fans' spiritual support, with which I could win this most important fight of my life.
"Yaegashi was strong and durable, so I had a very tough fight.”
The defeated ex-champ said: “Without such a badly swollen eye I could have shown a better performance, but I did my best.”
New unified champion Ioka now has 10 days with both belts before he must decide which one of the titles he wishes to keep and defend.