Hi OP,
I was in a similar position but less dramatic. DS was born tiny (5lb) and was on the 3rd centile, then dropped below the 0.4 centile line.
He was referred to a paediatrician and honestly she was hugely unhelpful. She told me to stick him on formula, to force it down him in anyway I can and that clearly me breastfeeding wasn't enough. Thing is, DS was always satisfied by my milk, refused bottles outright and there was no forcing it in him, nor did I want to. When it clearly wasn't working I chose to try feeding DS every two hours, night and day. That didn't really work either as he wasn't always hungry and we were both exhausted.
Then I saw the paediatrician again and again instead of trying to support breastfeeding in anyway she basically said I had to stop and he'd have formula if he was hungry enough. 28 hours later DS was in A&E with dehydration and I was hugely engorged, and he still wouldn't touch a bottle. The A&E staff were horrified.
Back to the paediatrician a week later and she recommended early weaning (at 4 months). This was awful and DS wasn't ready at all, I really wish I'd waited as he still has food issues now at 1.
I then finally was referred to a dietician who just said that I was doing everything right, and some babies are just small, it's perfectly normal. DS is still tiny and below the 0.4 line but he's doing great and eats plenty and I'm still breastfeeding, and so glad I listened to DS and my body and didn't quit.
Remember, if your baby seems satisfied and happy after breastfeeding, your milk IS enough. No baby NEEDS formula more than breastmilk and your body knows how much milk your baby needs. Trust it.