Dogs do have a form of memory known as "associative memory", which helps them associate specific actions with outcomes (e.g., sitting on command leads to a treat). However, whether dogs actively recall these memories when they're lying around is still a subject of scientific exploration.