With the game approaching the half-hour mark, it was the Premier League side who took the lead, when Ulloa latched on to a deflected shot by Matty James before slotting an effort past Loach.
Ulloa grabbed his second of the match 10 minutes later when he was picked out Ritchie De Laet before heading into the net.
Jordan Bowery came close to pulling one back for the hosts after the break, but his long-range effort flashed just wide of the post.
They did manage to get on the scoresheet in the 59th minute, when Kieran Agard powered a strike into the bottom corner from inside the box.
It took Leicester just five minutes to restore their two-goal advantage, as Danny Drinkwater volleyed past Loach after the ball had fallen kindly to him at the back post.
Ulloa came close to completing his hat-trick in the closing stages, but his lofted effort went wide as the visitors ran out winners.