Yes raycasting is what should help you. Not sure where your problem lies with it. In short you will need a check like this when you get a mouse click (or whenever you want to check)
unsigned int MASK = -1;//0xFFFFFFFF
Urho3D::Ray ray = camera->GetScreenRay(input->GetMousePosition().x_/float(window->GetSize().x_), input->GetMousePosition().y_/float(window->GetSize().y_));
PODVector<RayQueryResult> result;
RayOctreeQuery q(result, ray, RAY_AABB, M_INFINITY, DRAWABLE_GEOMETRY, MASK);
octree->RaycastSingle(q);
if(result.Size() > 0){
Drawable* selectedObject = result[0].drawable_;
//we hit something!
}
whereas window is your Urho3D::Graphics* window and the Urho3D::Octree* octree needs to be initialized, perhaps together with your camera like this
octree = scene_->CreateComponent<Urho3D::Octree>();
The MASK property can be used to ignore certain objects but for most cases that is not necessary.