I don't think it violates any AdSense policies to have both AdSense and Yahoo Ads or any other contextual ads in the same page. That restriction was removed long ago. Here is what the AdSense policies
say about using other contextual Ads:Competitive ads and services
In order to prevent user confusion, publishers may not display Google ads or search boxes on websites that also contain other ads or services formatted to use the same layout and colours as the Google ads or search boxes on that site. Although you may sell ads directly on your site, it is your responsibility to ensure that these ads cannot be confused with Google ads.
I would interpret it as - we should not use it in such a way that it will confuse users as Google Ads. As long as we can make it look different by using a different color or having a label, we are good to go. In the olden days, there was a rule that we cannot use competing Ads but later Google removed that requirement.
In fact, Google says in another place
that if we use similar Ads, we should atleast change the color of the Ads to make them look different. Here is what Google says regarding that:"if you choose to place non-Google ads on the same site or page as Google ads, it should always be clear to the user that the ads are served by different advertising networks and that the non-Google ads have no association with Google. If the formats are naturally similar, we ask that you choose different color schemes for the competing ads."
By having the label "Ads by Yahoo", we are meeting this requirement from Google. To make it further safe, we can use different colors, if we are still afraid of making Google unhappy.
If what I remember is correct, Google removed the "No Competitor Ads" policy when the original YPN (Yahoo Publisher Network) was introduced and people started removing AdSense to try YPN! since AdSense did not allow YPN Ads. Eventually YPN went out of business and now got a rebirth in the name of Yahoo Bing Ads, managed by Media.net