It was a weird moment that wasn't explained in the episode. But we have some theories about what that moment was all about.
1. There is no helicopter. Rick hallucinated the chopper. He had that confused, wild-eyed look he gets when he's losing it. He seems to be having visions these days — that flash-forward in the premiere is almost certainly a fantasy — and this is another one. He might be having a sort of reverie to when he saw the helicopter flying over Atlanta in Season 1. There have been a lot of callbacks to Season 1 this season, and this could be another.
2. It's the next enemy. An upcoming storyline in the comics is called "New World Order" and introduces a heavily militarized new community. The show could be skipping ahead to tackle that. If the show sticks to comics chronology, the next enemy after Negan will be the Whisperers, but we haven't seen any teases for the Whisperers yet. The show might be switching up the order, or skipping the Whisperers altogether.
3. It's setting up the Fear the Walking Dead crossover. The last helicopter we saw in the Walking Dead universe was in Season 3 of the prequel Fear the Walking Dead. It was the one the Black Hatters shot down and hauled back to the reservation. Maybe after Walker (Michael Greyeyes) and Crazy Dog (Justin Rain) headed north in the season finale, they went back to the reservation and fixed up the helicopter and have now flown it across the country and into The Walking Dead. The biggest hindrance to a crossover has been the geography, but maybe they figured it out.
We still hope the crossover will be Abraham, though. That seems like a better option.
The Walking Dead airs Sundays at 9/8c on AMC.