So in short, the answer is a resounding yes. Although cavalry fell out of favor by the 20th century, it didn't entirely go away after the rise of personal automatic weapons, and there have been examples of mounted units which would have been armed with weapons capable of automatic fire (I assume you want personal weapons, not crew-served, so would simply note cavalry included machine gun troops even prior to World War I, but those men would dismount and set up their guns to use).
The one that most immediately comes to mind would be "Grey's Scouts", a unit which fought in defense of the white racialist regime in Rhodesia during the 1970s. Properly considered a mounted infantry unit in that they were more likely to fight dismounted, they nevertheless would fit the bill, I believe, being both on horseback, and generally armed with the FN FAL, one of the principal arms carried by Rhodesian forces of the time, and one capable of automatic fire.
They are hardly the only example, though. Mounted forces were in use during World War II, and it is easy enough to find photographs of both Germans and Russians - the Eastern Front being the most common location for deployment of mounted units - carrying submachine guns or assault rifles: Germans with Stg-44s, and Soviet with PPsh American cavalry saw much less use, let alone combat, and in the lone mounted encounter I know of, as far as I can find were only carrying M1 Garands and M1911s at that time, as they were not issued 'Tommy Guns' or BARs at that point. This would change later, but by that point they were no longer mounted.
More recently, there were plenty of examples of mounted warfare in Afghanistan from the period of the Soviet invasion onwards, and a few headlines were made once the US got involved for the use of horses by American special forces, although we're getting on the wrong side of the 20 year rule there.
Works checked: