Probably, if you manage this right.
Depends on the type of injury and grade. Can be anything from a few weeks for a minor strain to requiring surgical intervention and months of rehab for a rupture. Generally soft tissue injuries take around about 6 weeks (often earlier for minor injuries tho) for early healing at which stage you should gradually return to activity. After six weeks your tissue will gradually adapt to the demands placed upon it i.e. return to full strength.
How you manage your injury will determine whether you come back stronger than before or end up suffering from constant pain and re injury in future. If you’re lucky a “leave it alone for a bit and try again in a few weeks” approach may work tho it’s a risk I wouldn’t take or recommend anyone else take. Rehab properly and come back in less time, stronger and with lower risk of re injury.
Rehab usually split up into stages:
Phase 1 - Injury Protection: Pain Relief & Control Inflammation
You’re probably past this phase already time line wise so you won’t get the benefits of early management. Some principles still apply tho e.g. not subjecting the injury to inappropriate/excessive loading for the stage of healing you are at and recognizing when some discomfort/pain is ok e.g. during stretching exercises and not ok and thus should be avoided e.g. jogging/jumping.
Phase 2: Regain Full Range of Motion
This is probably where you are at. It’s a terrible idea to completely avoid full ROM squats for 6+ weeks. As your tissue is healing and remodeling it can easily become stiff and shortened if left to its own devices. By the time you come back to Squatting you’ll descend to depth and re injure yourself due to the massive stretch placed the tight/stiff structures.
Best case scenario is that you are currently able to do full ROM body weight squats in your chosen stance. If you do them at least twice a day say…3x10 full ROM then you’ll be good for this phase. If you are unable to achieve full ROM without pain do not push into the pain. Holding onto something e.g. a squat rack or furniture may give you the support/confidence to ease lower.
If you are not at a stage where you can do BW Squats then look up groin and adductor stretches on google/YouTube and do these consistently with the above dosages. As for the BW squats do not push into pain there is no benefit to this and you may overstretch and re injure your tissues.
Phase 3: Restore Muscle Strength
This can be as simple and specific to Squatting or as complex and holistic as you wish, the one absolute is to gradually increase loading or return to activity. You see this mistake in professional sportsmen often who want to/are under pressure to return to play e.g. Gareth Bale re injuring his calf during El Clasico having barely lasted a half of football.
Some choose to simply Squat. Full ROM, clean, smooth, controlled reps. Start with the bar and gradually up the weight. Remember your tissues are still healing technically and this is like conditioning them to the loads and giving them time to adapt and fully regain strength. You can’t really go too slow in working your way back up. This works well enough for many people.
A more complex approach where contributing factors e.g. muscular imbalances, weaknesses etc. to the original injury and targeted interventions to address this is something you’ll need the help of a physical therapist/physio or other qualified health professional to sort out.