The attack on Wednesday in Zorkoum targeted a unit of soldiers and members of the Volunteers for the Defense of the Fatherland (VDP), the source said.
"We have sadly lost four soldiers and 10 volunteers. On the enemy's side, around 20 soldiers were neutralized," the source said.
Another security source said "several" members of the security forces were killed, while a local official confirmed the attack but did not give a toll.
The unit in Zorkoum had been tasked with providing security for workers fixing the water supplies for Kaya, around 10 kilometers away, which have come under frequent attack, the local source said.
Junta leader Captain Ibrahim Traore had arrived in Kaya early Wednesday for a 48-hour visit.
He went to the site of the attack "several hours later" to "pay tribute to the bravery of the forces, who repelled the attack and inflicted enormous casualties," a senior security official said.
Vowing to recover lost territory after he came to power in September, Traore has staked much of his strategy on the VDP.
Its members are civilian volunteers who are given two weeks' military training and then work alongside the army, typically carrying out surveillance, information-gathering or escort duties.
But the force has suffered heavy casualties since its creation in December 2019, targeted by roadside bombs, ambushes and hit-and-run raids by jihadists riding on motorbikes.
Five VDP members were among 11 civilians who were killed in attacks on Sunday and Monday in the country's east and center-east.
Burkina Faso is battling a jihadist insurgency that spilled over from neighboring Mali in 2015.
More than 10,000 civilians, troops and police have been killed, according to one NGO estimate, and at least two million people have been displaced.