Is this a duckling that's being rehabilitated? I ask because most wildlife rehabilitators release ducklings in a group of other ducklings when they're about two to three months old. From what I've observed, they tend to stay in their group for at least the first few months, slowing integrating into the rest of the flock.
But, for wild ducklings, it varies. Some stay with mom until they're over two months old. Others will leave mom when they're fully feathered, around 6 or 7 weeks old and hang out with other ducks around the same age. But, those are ducklings that have lived in the area their whole lives. So, they know everyone and who they can get close to or need to stay away from.