I just have a hard time imagining two NHL teams sharing an AHL affiliate. There would be so much internal complaining. If they are forced to with a gun to their head they might otherwise I can't imagine two teams willingly sharing an AHL team.
It used to happen, quite frequently. It wasn't until Edmonton got off their butts and reactivated their dormant franchise in Oklahoma City in 2010 that the league finally had a 1:1 ratio with the NHL.
Edmonton, Anaheim, and... a few other teams shared affiliations until they could partner with a team exclusively (yes, Edmonton shared an affiliation even though they owned and never used their own AHL franchise).
It seems awkward, but some of the players on rival teams are friends off ice already.
At the ECHL level, teams share affiliations frequently because of the lack of players signed to ECHL contracts and because the number of teams is less than 30.
If you think St. Louis placing their players on different teams is awkward, just think about this: the Detroit Red Wings (at the time still in the Western Conference) and the Chicago Blackhawks split the affiliation of the ECHL Toledo Walleye, with players from Toledo being called up to play against each other in Grand Rapids and Rockford.