Really would need some more information. Such as square footage of the property, what the foundation you referenced is for, exact scope of work ("gut rehab" means different things to different people), desired quality of the finishes, how you are trying to complete the construction (hire a property management firm, hire a GC, or sub out the work yourself for example).
The most likely answer is that yes, you can probably get away a $40K rehab to get it rent-ready if that's all your budget allows even if it is mostly a full gut. But it's possible that you'll need to cut some corners on quality of finishes, or by using less qualified contractors, or by GCing the work yourself, or the rehab taking a long time, or cutting back a bit on the scope of work, etc.
If it's a true gut rehab (i.e. taking it down to shell condition then replacing everything) then depending on the square footage and the setup and if you're trying to do this from out of state and complete with desirable finishes, you will probably want to budget more like $50-80K (I'm assuming this is around 900-1,200 sq ft).
But again, really need to look at more information to be sure. There are single family properties in that area of West Philly that are under 800 sq ft or ones that are 2,000+ sq ft. And if you need to replace water and sewer lines and pour a concrete slab for the yard and fence the backyard that's around $10K+ out of your budget right there without even touching the interior.