An Apple Pencil is “paired” with its host iPad. After pairing, the Pencil will only be recognised by the device with which it is currently paired. Whilst this is useful in being able to quickly identify a Pencil’s ownership amongst multiple iPads, it is not necessarily a reliable indicator of ownership.
An Apple Pencil will automatically (re)pair with a compatible iPad when connected for charging. For example, a first generation Pencil will automatically (re)pair with an iPad when connected to the iPad’s Lightning connector. Similarly, a second generation Pencil will (re)pair if docked to an iPad’s magnetic charging port. A Pencil will remain paired with its host iPad until it is either paired with another compatible iPad - or the “pairing” is manually forgotten from iPad settings.
As such, Pencil’s are “promiscuous”, in that they will automatically pair - and subsequently work - with any compatible iPad. Another property is that a Pencil can only be paired with one iPad at any time. You can potentially use this knowledge constructively to demonstrate ownership.
Returning to your conundrum - on the assumption that the found Apple Pencil has not been physically connected to a compatible iPad, the Pencil will only work with the iPad with which it is currently paired. Similarly, an iPad will only work with the Pencil with which it was last paired.
It follows, therefore, that providing that neither iPad nor Pencil has been physically connected to another device, any Pencil will only interact with the iPad to which it belongs.
As a learning exercise, assuming that a Pencil is not engraved or has other physical marking (therefore eliminating any ambiguity as to ownership), you would be well advised to make note of the Pencil’s serial number. When physically connected to iPad, the serial number can be seen in iPad Settings:
Settings > General > About > Apple Pencil
A closing thought…
If you still have the box in which the Apple Pencil was supplied, the box will have the serial number of the Pencil on an attached label. This can be matched to the serial number of the Pencil - that can be viewed via iPad Settings. Be mindful, however, that attaching a Pencil to a compatible iPad will cause the Pencil to pair with the iPad…