Anharmonicity-induced resonances for ultracold atoms and their detection