The Vinaya actually goes into all of this under the rule against stealing. The question involves the factors involved in stealing:
- the object has an owner,
- you perceive that the object has an owner,
- you intend to steal it,
- you make effort to steal it,
- you succeed in stealing it.
All have to be fulfilled in order for it to be stealing. So if you think something has been discarded, it is not stealing, even if it turns out that it has an owner. If you find out later that the item you took actually has an owner, any act you perform in relation to the item from that point on could potentially be an act of theft.
The point of the rule is to respect ownership; it has nothing to do with unowned items, or acts performed that do not breach that respect (e.g. taking something under the assumption that it has no owner).
The case where there is doubt about whether an object has an owner is more difficult, and it comes down to the third factor - intention. If you take an object that you think might have an owner with the intention to return it if you ever find out it has an owner, then it would not be considered stealing. Obviously, this becomes more unreasonable the more likely it is that the object has an owner. Really, the only way you could rationalize taking such an object is in the case where there is no compelling reason to think that the object has an owner still concerned with the object.
If it seems likely that the object has an owner who hasn't abandoned it, then it should be left alone - or the owner should be sought out. If it seems likely that the owner has long abandoned the object, then it may be taken as a possession if there is need.
The BMC I has some discussion about this sort of question as it relates to monks:
Because items that have been given away or discarded do not fulfil the factor of object here, there is no offense for a bhikkhu who takes a discarded object—such as rags from a pile of refuse—or unclaimed items from a wilderness. The Commentary, in some of its examples, includes items given up for lost under “abandoned,” but this interpretation has to be heavily qualified. If the owner retains a sense of ownership for the lost item, it would fall under the term claimed, and thus would still count as not given. Only if the owner abandons all sense of ownership would it genuinely count as abandoned.
None of the texts discuss the possible case in which one might be in doubt as to whether the object in question is not given, perhaps because the compilers felt that the factor of intention, discussed next, would not apply in such cases. Thus it would not be an offense under this rule. However, the wise policy when one is in doubt about an item’s ownership would be not to take the item for one’s own, or at most to take it on loan, as explained below.