Video from the protest in Phoenix, Arizona, shows the man standing with other protesters, with the rifle slung over his right shoulder.
Phoenix police said authorities monitored about a dozen people carrying weapons while peacefully demonstrating.
"It was a group interested in exercising the right to bear arms," police spokesman Sgt. Andy Hill said.
Arizona law has nothing in the books regulating assault rifles, and only requires permits for carrying concealed weapons. So despite the man's proximity to the president, there were no charges or arrests to be made. Hill said officers explained the law to some people who were upset about the presence of weapons at the protest.
"I come from another state where 'open carry' is legal, but no one does it, so the police don't really know about it and they harass people, arrest people falsely," the man, who wasn't identified, said in an interview aired by CNN affiliate KNVX. "I think that people need to get out and do it more so that they get kind of conditioned to it."
Gun-toting protesters have demonstrated around the president before. Last week, a man protesting outside Obama's town hall meeting in New Hampshire had a gun strapped to his thigh. That state also doesn't require a license for open carry.
U.S. Secret Service spokesman Ed Donovan acknowledged the incidents in New Hampshire and Arizona, but said he was not aware of any other recent events where protesters attended with open weapons. He said there was no indication that anyone had organized the incidents.
Asked whether the individuals carrying weapons jeopardized the safety of the president, Donovan said, "Of course not."
The individuals would never have gotten in close proximity to the president, regardless of any state laws on openly carrying weapons, he said. A venue is considered a federal site when the Secret Service is protecting the president and weapons are not allowed on a federal site, he added.
In both instances, the men carrying weapons were outside the venues where Obama was speaking.
"We pay attention to this obviously ... to someone with a firearm when they open carry even when they are within state law," Donovan said. "We work with our law enforcement counterparts to make sure laws and regulations in their states are enforced."