Not with the default
traceroute program which by definition uses a response from a gateway (see man page):
traceroute tracks the route packets taken from an IP network on their
way to a given host. It utilizes the IP protocol's time to live (TTL)
field and attempts to elicit an ICMP TIME_EXCEEDED response from each
gateway along the path to the host.
If there is not a gateway on the traced path, only Layer 2 devices, the IP will not be reported.
But Cisco has a utility that works on Layer 2.
But this utility is dependent on CDP protocol which :
Cisco Discovery Protocol (CDP) must be enabled on all the devices in
the network. For the Layer 2 traceroute utility to function properly,
do not disable CDP. If any devices in the Layer 2 path are transparent
to CDP, the Layer 2 traceroute utility cannot identify these devices
on the path.
Check additional information here:
Cisco Layer 2 Traceroute Utility