There is no explicit marker that identifies a hash as being related to a transaction/block, but as mentioned by OP, there is an implicit assumption that can be made, due to the difficulty target for blocks that is imposed by the network’s nodes.
Pragmatically, this means that a hash with an improbably low value could be assumed to be a potential block hash. Note that whether or not this represents a valid block cannot be known from the hash alone. While it is possible for a transaction hash to have an equivalently low value, this is incredibly unlikely (assuming someone isn’t grinding through transaction hashes to find a value below the difficulty target, but doing so would be extremely expensive, for no real gain).
Conversely, a hash of any arbitrary value is likely not a valid block hash, as it would fail to satisfy the network’s difficulty requirement.
All of that said, in order to determine if the hash in question is actually related to a valid block/transaction, you will need knowledge of the current network state (ie, you will need to verify it using some sort of bitcoin fullnode).
An improbably low hash value may be representative of a block, or a transaction (though highly improbable). A full node is required to verify the validity of this hash, in any case.
An arbitrary hash value may be representative of a transaction, but again a full node is required to verify the validity of this hash.