Can I have two files with same name but different directory?

No matter from which perspective you consider it, it is bad practice to name files the same. To answer your question: Yes, you can do it this way, which doesn’t mean that you should it this way. Even you, the developer of the theme, will get confused (I bet some beer or coffee if you want) from time to time when you are not aware of the current file which you are editing.

Your theme will propably not get rejected if the things works a 100%.
However, you should stick to WordPress’ mentality: code is poetry.

There are lots of options you have, for example:

  • you could prefix (for example: tpl-home.php, etc.) the template files instead of naming them the same.
  • you could name them differently
  • put them in a folder called “template-parts” or something similar

It is recommended to stick to your internal code convention in terms of structure. That way somebody who has downloaded your theme will faster be able to modify it to their needs. Because they don’t need to go to university in advance to understand your logic. (you get the idea).

That, in return, will make your theme users happy because they can achieve their goals in terms of layout etc.. Make sure correct translations and child theming is supported/works.