I am in IB and a lot of students who graduate from my school often have enough credits to graduate highshcool with their associates degree once they go to college.
Theoretically, would it be better to go to a state school for undergrad and use these credits and then apply to an ivy league for grad school or to go to an ivy league and not use the credits, since they usually dont accept them?
The credits are really dependant on your major though, even in a state school. The oversell of the IBD for credit is a bit of hyperbole IMO, whereas the fact that is is great prep for college is unquestionable. The IBD is not an entry bonus for an Ivy either. This isn't an either or scenario. Your IBD is not half a degree. However they might like to spin it.
IB HL exam scores may give credit units or subject credit at some colleges, regardless of whether the student completed an IB diploma. Check each college’s IB credit web page for more information.