Confirm please you mean 2great grandmother. It's somewhat complicated, but it could be possible.
Sorry, I can't say that is a certain option.
There are a couple of types of DNA tests. The most common type is for tracking an unbroken paternal lineage. This is called a Y DNA test. I have the same Y chromosome, barring a new mutation which is fairly rare, as my father, as his father (who is from Iowa), as my father's father's father (who is Edmund Walsh from Co. Kilkenny). So the Y DNA, barring adoptions, etc. should go with the paternal surname. This tests just the one of the 46 chromosomes every man has.
I presume your 2g grandmother was born into a Walsh family. That means you'd be looking for any male descendants of her father, father's brothers, father's parternal male cousins. Of course, normally, that means you'd expect that relative to have a Walsh surname.
The science and cost (like $100 or some cases less) efficiency for the Y DNA there is good.
There are other types of DNA tests that can be used for situations where you don't have an unbroken paternal line to a living person you can test. One option autosomal testing where they test the complete (or at least of lot of the) set of 44 chromosomes other than the final XY (for a man) or XX (for a woman.) However this is much more expensive and more difficult to interpret. These other chromosomes, which decide your height, eye color, etc., etc. are literally a blend between the father and mother. After several generations, it may be difficult to find a matching "remnant" of a segment of a chromosome from someone else. I'm not an expert on this. Not a lot of people are doing it yet.