It sounds like you have an image that has something that includes the weapon. Is that right? I will assume it is for what I'm about to say although it should be similar even if that isn't the case.
Anyway, as I was reading I was thinking that you need a separate rectangle to check but I'd say an sf::FloatRect is all that is needed rather than an entire sf::RectangleShape, although they're quite cheap.
My fuller suggestion would be to create "hitboxes" for everything and then check them.
That is, something like this:
std::vector<sf::FloatRect> hitboxes;
Or, indeed, create separate entities that contain them. Something maybe like this:
class Entity
{
public:
// ..
sf::FloatRect getHitbox() const { return m_hotbox; }
private:
sf::FloatRect m_hitbox;
};
You can then go on to make a linking system that allows entities to be linked to another and that should help with making one entity (the weapon with its hitbox) follow another. Of course, an entity doesn't necessarily need to be drawable (it may or may not have a sprite, for example).