Whether or not you tell Alex you heard him talking generally doesn't impact your relationship with him. Most dialogue choices in Alex's heart scenes don't affect your friendship points, with the exception of the five-heart event. So, when Alex confesses to his dog, you can admit or deny to hearing him with no consequence.