Put it in a warm water soak. It may be a prolapse, but not real sure, just don't let it dry out. @Yvonne G can confirm. For a baby that young, I have never seen it.
That doesn't look good, does it? It's not a penile prolapse, and it doesn't look like female parts either. The best thing is to try to reduce the swelling, then gently push it back inside.
Make a paste of sugar and water, and apply it to the 'bubble'. That is to try to reduce the swelling. If that doesn't work, then try applying hemorrhoid cream to see if that will reduce the swelling.
At any rate, whether you can reduce it or not, this baby needs to be taken to the vet immediately. And whatever you do, keep that bubble moist, don't allow it to dry out. It will not harm the baby to leave him sitting in a tiny bit of water until the vet can see him.