In light of your recent remarks that he refuses to nurse.... have you tried looking in his mouth and seeing if he has "Thrush" or anything, or early teething? Many times, mouth discomforts makes a baby appear to "not" want to nurse.
If there are white patches in his mouth... then that is Thrush and he has to be taken to the Doctor to treat it, and your nipples too.
ALSO, I would tell your Pediatrician about this.
Even though your baby has wet/poopy diapers and is gaining weight.
Maybe he does not want to nurse... maybe have you tried a bottle? I know, that is not the desired option. But maybe, since he is only 3 months old. And yes, for the 1st year of life, a baby's PRIMARY source of nutrition is from breastmilk/Formula, and they need to be fed on demand for the 1st year. This is per my Pediatrician.
But as you said, your baby is gaining weight and has the wet/poopy diapers. But at 3 months old, this is ALSO a growth-spurt time, and typically they feed more at these times or whenever there is a growth spurt.
I would, check with your Pediatrician.
All the best,
Susan