Yes, rabbits can eat oats but, as with any grain, you shouldn't feed them too much because too much starch can cause diarrhea. Grains are naturally high in starch (whole oats are around 57% starch and other grains are much higher) and research shows that digestive problems occur if the diet of a rabbits is higher than 11% to 14% starch. For this reason you shouldn't feed very many oats to your rabbit.
Diarrhea and bloating can quickly happen if too much undigested starch is not absorbed before it goes into the caecum at the end of the digestive tract. This starch is like candy for bacteria. A small amount of starch is helpful to promote the digestion (fermentation) of good fiber but too much leads to a change in pH and the growth of bad bacteria. The growth of the bad bacteria is what causes bloating and eventually diarrhea.
Furthermore oats do not provide the protein, choline, and other nutrients that rabbits need to be healthy. Many people feed their rabbits oats but it is only as a part of a complete balanced diet. Many people also think that oats are healthier for rabbits than other grains but this is only because they contain less starch.