1) She was to have returned yesterday, but she fell ill.
2) She was to return yesterday, but she fell ill.
Does both the sentence have same meaning?
As to the wording of the two sentences, Sentence 1 sounds great. Sentence 2 is not quite right. It should be:
"She was to return yesterday, but she fell ill."
That is because when someone was supposed to do something, you use the infinitive, either "to return" or "to have [returned]".
The difference in meaning of the two sentences (with "to return" vs. "to have returned") is insignificant in this situation.
Picky people might be able to detect a very slight difference in emphasis. In Sentence 1, the present perfect (to have returned) is talking about a time (hypothetically, yesterday) when she would have already finished her return trip, and would be then at her destination. Sentence 2 is written from the point of view that her return (the trip itself) was supposed to happen yesterday.
Essentially, "She was to have returned yesterday," and "She was to return yesterday," mean the same thing.