For anyone still looking, the answer is yes.
In my case, I have a .NET 9.0 application and a .NET 9.0 xUnit test project and I run both of them in Docker. In order to be able to see the tests in TeamCity, I had to install a TeamCity plugin as per this link :
And modify my Dockerfile a little ( again, this is specific to xUnit ). I had to add this to lines at the end:
ENV TEAMCITY_PROJECT_NAME = <YourProjectName>
CMD ["dotnet", "test", "--logger:console;verbosity=detailed", "--results-directory=/app/TestResults"]