Opportunity attacks (p290) are a type of opportunity action (pp268-9), which by default you can use once per each other combatant's turn. By default, an opportunity attack is a melee basic attack (p287). As a special note, you can use unarmed attacks to make melee basic attacks.
Therefore, if you are holding nothing, you can use an unarmed attack to make opportunity attacks. If you are holding something that isn't a melee weapon, you can use it as an improvised melee weapon (p219), or you can make an unarmed attack with a kick, headbutt, or similar (p216). Hopefully this is sufficient evidence to establish that you can make opportunity attacks regardless of what kind of weapons, implements, or stuffed animals might be occupying your hands.
Note that several conditions (p277) explicitly prevent you from taking opportunity actions.
Flanking (p285) has two requirements. You and an ally must be on opposite sides of the target, and both you and the ally must be "able to attack the enemy, whether you're armed or unarmed. If there's no line of effect between your enemy and either you or your ally, you don't flank. If you're affected by an effect that prevents you from taking opportunity actions, you don't flank."
Ranged weapon or not, if you have line of effect and aren't affected by an adverse condition, you provide a flank for your allies.
t~