I agree that it is a ball-float valve - but it could be off any water storage system, such as a toilet cistern, animal water trough.
A cool find - it looks very old.
I did a quick search to find a pic, but more modern ball-float valves look very different although they use exactly the same principle. Contemporary cisterns have done away with the float-ball and lever-arm entirely.
Mike