Tell us more about how he's being kept. Temperatures (highest & lowest), size of enclosure, humidity, substrate, what kind of heat are you using, & anything else that might be relevant.
Has he been dropped or taken any falls? Are there climbing branches in his home- can he hang on to them? What's his appetite been like?
I see you also have a turtle- do you keep your snake away from the turtle at ALL times & always wash your hands thoroughly between handling or caring for them? This is very important, as most turtles carry salmonella, & your snake can catch that or other things (pathogens & parasites) from other pets you have.
Your snake sounds fairly sick by your description & by your level of concern- how long has he been like this? You may need to see an experienced herp vet since there's a limit to what we can diagnose or help you with here, & if you need to find one in your area, this may help: https://arav.site-ym.com/search/custom.asp?id=3661 (But just so you know, IBD is scary for sure, but unlikely to be the issue with your rat snake.)