advertising on relevant websites is white hat and allowed by google. every fortune 500 company buys banner ads and even i make room in my frugal marketing budget for relevant banner ads.
when this starts to get abused and a webmaster solely buys advertising for link juice then it strays into the black hat area which google does not like. most of the times when google thinks a webmaster is breaking the rules they simply devalue the link juice of the suspected links and/or change the toolbar pagerank.
my simple rule is that if i think a banner ad, text link or any other ad will generate real traffic that will convert then i do it. i rarely have issues when i follow that rule. it is sometimes hard for google's algo to separate the white hats, black hats and greyish hats. to decrease the chance of accidentally triggering google's tripwire i would suggest you proceed slowly and gradually overtime.
good luck :)