Unfortunately non-alcoholic beers are not completely ethanol
free. Most have an ethanol concentration of about 0.5%. ETG tests have been notorious for false positives. It has been suggested that ETG/ETS tests can detect alcohol
after someone uses mouthwash. The ETG test will likely be able to detect even that small amount of alcohol (2 beers at 0.5%) in that short amount of time (24 hours). Whether or not that detection will be high enough to constitute a positive is not clear to me and is likely dependent on the particular testing protocol of whatever facility/agency conducts this test.
I'm sorry I don't have enough experience with ETG/ETS testing to make a definite statement. Failing an ETG test after drinking a couple of non-alcoholic beers within 24 hours of the test is a risk as far as I'm concerned. Beyond 24 hours I would think is unlikely (but possible). I wouldn't think a positive would register beyond 2 days though. The max detection time for ETG is typically regarded as 5 days with heavy drinking.
For more information on drug
testing please see this sticky: Drug Testing - A Comprehensive Guide
You may ask relevant questions there.