She gave birth to a daughter this past September and has played just four professional tennis matches so far this year during her comeback, losing two of them.
Williams returned to the professional Women's Tennis Association tour in March at Indian Wells in Southern California.
The former world No. 1 could face long-time rival Maria Sharapova in the last 16.
Without a seeding, the 23-time Grand Slam champion risks facing highly ranked players in the early rounds.
The hard-hitting Ostapenko, who past year became the first unseeded player to win the women's title since 1933, was handed a tricky draw as she could face former No. 1 Victoria Azarenka in the second round.More news: Driver WARNING - Petrol and diesel prices could rise over 140p per litre
More news: United States federal court says 'NO' to President Donald Trump
More news: Manchester holds mass singalong for arena victims on anniversary of attack
The ruling means that Williams, who was ranked by the World Tennis Association (WTA) as No. 1 a year ago but has dropped to No. 453 due to her absence, risked being pitted against top-ranked players early in the competition.
Serena will be playing in her first major tournament since winning last year's Australian Open, having taken time off to give birth to her first child. Williams, then ranked 81st, won that tournament, thrashing the top-seeded Sharapova, 6-1, 6-2, in the final.
Venus and Serena Williams are set to feature in women's doubles at the 2018 French Open after being offered a wild card by tournament organizers on Thursday.
The defending champion, who opens against 54th-ranked Ukrainian Alexandr Dolgopolov, is on the opposite half of the draw from numerous players considered most likely to challenge him.
But star of the clay-court season Kvitova is in sparkling form, should be well-rested after skipping Rome and has a very favourable draw - she's who I'll lump for (though, as always with the WTA draws, with little confidence)!
"I think it's more of a protection for women to have a life", Williams told The Times.
"It's a tough call, I would like to see that change", Sharapova said.