In short, alcohol is a known diuretic (it makes you pee). Studies cited here agree that drinking alcohol dehydrates relative to the amount of water consumed. In other words, the more alcohol and the less water you drink the more you would get dehydrated.
But, since we usually consume alcohol with lots of water (beer is only around 4-8% alcohol) at some point the hydrating effects of water are stronger than the dehydrating effects of alcohol. For example, one of the studies showed that beer could have a hydrating effect, although it was not as effective at it as pure water. Unfortunately, medical literature on the topic does not give us a "magic ratio" of alcohol to water needed to stay hydrated.
According to an article published in the peer-reviewed journal on Alcohol and Alcoholism, alcohol is a known and extensively studied diuretic. This study contains an excellent review of academic literature in support of its claims. The author writes:
The extent of the diuresis experienced is thought to to be dependent on the amount of alcohol consumed, and its effects on hydration status will be influenced by the concentration of alcohol relative to the water-ingested beverages.1
A 2014 study on "Postexercise rehydration with beer" found that "beer impairs fluid retention, reaction time, and balance." It concluded to say that:
Rehydration with BEER resulted in higher diuresis, slower RT, and impaired VCoP than rehydration with LAB or WATER.2
By contrast, a 2015 crossover study on the "Effects of a moderate intake of beer on markers of hydration after exercise in the heat" concluded that:
After exercise and subsequent water losses, a moderate beer (regular) intake has no deleterious effects on markers of hydration in active individuals.3
However, even these negative findings seem to support the consensus as described in the first article. Citing two further studies, the authors write that:
Alcohol may represent a serious drawback that can blunt beer’s rehydrating capacity and negatively affect the restoration of fluid balance increasing the diuretic response in the body.3
For a review on literature about caffeine and dehydration see Does drinking coffee or tea dehydrate you?.
Alcohol Alcohol. 2010 Jul-Aug;45(4):366-73. doi: 10.1093/alcalc/agq029. Epub 2010 May 24.
Appl Physiol Nutr Metab. 2014 Oct;39(10):1175-81. doi: 10.1139/apnm-2013-0576. Epub 2014 May 27.
J Int Soc Sports Nutr. 2015 Jun 6;12:26. doi: 10.1186/s12970-015-0088-5. eCollection 2015.
Please note that this answer does not constitute medical advice. It is only meant to summarize published research related to the topic and limited to the cited sources. Consult your physician about what these results may mean for your health.