To share my own experience, I ran my first road marathon a few years ago with only around 6 weeks of training and it was the most painful running experience of my life. Over the last 15km I was just trying not to cry lol. In hindsight, I had a great time but I was risking injury, especially since I had no previous running history.
That being said, if you have been maintaining between 30-50km/week you can probably survive a 50km ultra if your goal is finishing as opposed to performance. Not sure I’d recommend it but I’ve seen worse. Are there any other upcoming events you can properly train for, perhaps in September or October?