All materials have magnetic properties of one sort or another. A strong enough magnetic field will either induce a similar magnetic polarization (paramagnetic) in a given material, or induce an opposite magnetic polarization (diamagnetic). Here is an article about levitating a frog by using its diamagnetic properties. This is another article describing some fun demonstrations of the principle.
This article goes to greater depth, and answers your question:
Paramagnetic materials characteristically align with and strengthen an
external magnetic field, while diamagnetic substances partially expel
an applied field and always align themselves so that they are
perpendicular to its lines of magnetic force.
The fact that a diamagnetic object aligns perpendicular to the applied magnetic field means that a stick in a strong diverging field will align perpendicular to a north-south line. It won't tell you what direction is north. Maybe a more complicated diamagnetic structure (e.g., a T-shaped structure hinged at the T intersection) can point north if you're in the Northern hemisphere, but it would point south in the southern hemisphere, because it would actually be sensing the divergence of the magnetic field density rather than the field direction per se.