Batman has used the Yellow Lantern Ring twice, once in the Forever Evil arc (Forever Evil #4) and once in Green Lantern: Sinestro Corps War
Forever Evil #4:
Batman secretly hid the Yellow Lantern ring disguised as a Kryptonite ring. However when he tried to use it, he was easily overpowered by Power Ring.

Click images to enlarge
Green Lantern: Sinestro Corps War
Right before the events of the Sinestro Corps War, Sinestro sent of several Yellow Lantern rings to seek out wielders. One such ring found Batman. But his willpower was greater than the fear power thus the ring almost immediately rejected Batman.

Click image to enlarge
Batman has also wielded the Green Lantern ring several times
The list includes:
Justice League: Darkseid War by writer Geoff Johns. When Bruce is unable to stop using the Mobius Chair, Hal Jordan intervenes to eventually free him from the chair's grasp. Hal slips the ring into Batman's finger to only save and free Batman from the chair's hold on him. In this case, it was merely to free Batman so it may not count.

Click image to enlarge
Batman: In Darkest Knight by Mike W. Barr and Jerry Bingham, where Bruce Wayne was found worthy of the ring rather than Hal Jordan after the death of Abin Sur. So in this case, he is effective and powerful as any Green Lantern. This is an elseworld story arc.

Click images to enlarge
Dark Knights: Metal by Scott Snyder and Greg Capullo where Bruce Wayne is once again chosen by the Green Lantern ring the night his parents were murdered. An interesting take where Bruce actually overpowers the ring's willpower unlocking the use of lethal force. He then dons a new name Dawnbreaker.

Click images to enlarge
Finally Batman has wielded the Black and White Lantern rings once
Batman's corpse was reanimated and brought back to distorted life as a Black Lantern by Nekron and Black Hand.

Click images to enlarge
And finally, after the events of the Blackest Night story, in Issue #7, many dead heroes were brought back to life. But only Deadman was gifted with a White Lantern ring, choosing him as its guide as they went along seeking the champion of Earth as its host. Naturally, Deadman thought that the only person this champion could be was Batman.
When he found him, Deadman thrust the ring on the Caped Crusader, shouting that Batman would know what to do because Batman always knows what to do. But while Batman was able to wield the life-powered ring for a short amount of time, it also had a mind of its own and deemed that the burden of the white ring should not be on Bruce Wayne.