Sneak attack says (PHB p.96):
You don't need advantage on the attack roll if another enemy of the target is within 5 feet of it, that enemy isn't incapacitated, and you don't have disadvantage on the attack roll.
So, as described you cannot sneak attack.
However, advantage and disadvantage says (PHB p.173):
If circumstances cause a roll to have both advantage
and disadvantage, you are considered to have neither of
them, and you roll one d20. This is true even if multiple
circumstances impose disadvantage and only one grants
advantage or vice versa. In such a situation, you have
neither advantage nor disadvantage.
So if the rogue had advantage to cancel the disadvantage (say, be being hidden) and had an ally adjacent the foe (since the disadvantage negates the advantage and vice versa) then they can sneak attack.