No - targeting is not perceivable by the characters in-game
First, you decide what perceivable circumstance will trigger your reaction.
Targeting is something that only occurs outside the fiction of the game. To qualify as a trigger it must be observable by the character in the game.
When the dragon you are fighting rushes forward and starts to breath fire, how do you know who it is targeting? You don't. You can try to guess, but the fact that you have to guess means that it is not observable.
Though you did not ask about them, it is worth pointing out that the targeting of spells is even less observable and more clearly not a valid trigger: Can the target of a spell be identified before the spell is cast?
Targeting is a mechanic, is not observable and is thus not a valid trigger.
Triggers must be phrased in terms of what a character can see/hear/perceive
If I set my readied action as "I cast this spell if anybody targets me with an attack" this has a major issue. Because it is not phrased in terms of what my character can actually perceive, it could technically trigger off of things my character could not possibly be aware of. For example, with the above trigger if an invisible archer who I was not previously aware of shoots an arrow at me, my readied action would technically trigger.
Obviously, the DM in this case could (and should) just rule that the readied action did not apply. But the whole situation arose because the trigger that was set was not phrased to be based on what the character could perceive and thus should not have been allowed in the first place. Fortunately, there is an easy fix for this.
When my players use a trigger says "targeting" I clear it up very easily by asking them to rephrase it in terms of what the character is looking/listening for. For example, "when the archer targets me with an attack" becomes "when the archer points her bow at me". Thus an invalid trigger becomes a valid one extremely easily. It just has to be phrased in terms that the character can actually perceive.
Jeremy Crawford has commented on a similar situation:
The trigger you choose for the Ready action must be a "perceivable circumstance" (PH, 193). A caster doesn't perceive turns ending.
A "turn" is another mechanical concept which is also not perceivable by the characters. Jeremy Crawford correctly points out here that it is not a valid trigger for that reason.
Let's start with your incorrect premise: an Area of Effect does not go around corners (unless specified by the effect). There must be a clear path to the point of origin for the effect, and then a clear path from the point of origin to the affected creature. This might seem like going around corners but is actually two straight lines. [See Area of Effect and Cover, DMG p251.]
In the case of dragon's breath, the point of origin is the dragon, with the Area of Effect being a ray or cone. Thus, there must be a clear line from the dragon to the target.
Arrow slits provide 3/4 cover [DMG p251]. Dragon's breath would come through the slits. If there are places on the wall where you could stand away from the arrow slits, those spots would have total cover (see below diagram for a cone AoE).
Thus, if you are standing at the arrow slit casting spells or shooting at the dragon when it uses its breath weapon, you would need to make the required save.
By RAW, 3/4 cover gives +5 to AC and Dex saving throws [PHB p196]; however, a DM may house rule advantage instead of +5 on the save if a square with total cover is next to you.
Best Answer
No, this won't work
The method for readying an action is that you use your action to hold the spell at the ready (pre-casting it), then use your reaction to cast it when a given trigger occurs.
But here's the catch (PHB, p. 193):
If you have readied a spell to cast if a dragon uses its breath weapon, the only time you may unleash the spell is after the dragon has used its breath weapon and the outcome of that has been resolved (finished). Meaning you will cast Wall of Stone after the dragon uses its breath weapon, and thus after you've already saved/taken damage from it.