According to Lynn Olson & Stanley Cloud's For Your Freedom and Ours...
The Poles in question had been taken prisoner by the Soviets, but after (much) lobbying from Churchill at the prompting of the Polish government in exile, Stalin agreed to release them. The soldiers, along with interned Polish civilians, were nicknamed "Anders' Army" after their head, General Wladyslaw Anders.
After much reluctance to expend any resources on the Poles, they were finally evacuated through the Caucssus to British Palestine.
En route, they passed through Iran, where they met a young boy with a pet baby bear who looked distinctly malnourished, so the Poles bought the bear and improvised a teat over a can of condensed milk.
The bear, christened Wojtek (pronounced, and sometimes spelt "Voytek" in English media) grew up while the Poles were given weapons, uniforms and training in Palestine and organised into Polish II Corps. Wojtek managed to corner an unsuspecting enemy spy in the shower block and took to wrestling with his comrades, smoking cigarettes and necking beer straight from the bottle.
By the time that II Corps were embarking for Italy, British regulations didn't permit regimental mascots on campaign, so Wojtek was officially inducted as a Private in the Polish army. He was attached to an artillery unit and at the Battle of Monte Cassino famously carried ammunition.
Did Wojtek make a significant contribution to the war effort? Not really. Was he a morale-booster? Absolutely.