Causal inference where potential outcome is somehow "violated"? The fundamental problem of causal inference says that only one potential outcome is observed for each unit.
What happens if both outcomes from control and treatment can be observed? Can we still make use of analysis tools like causal trees to understand heterogeneous treatment effects?
As a concrete example, suppose we are an online search engine and want to better understand how to serve ads. Each time a user enters a search query (request), we pick an ad from a collection of $N$ ads and show it to the user. For each of these $N$ ads, there are 2 versions, one with an image and one without. We randomize users into a control group and a treatment group (same distribution of users in each group), where users in the control group will see ads without an image and users in the treatment group will see ads with an image. By the end of the experiment, for each ad we record the total number of clicks by users in the control group as well as in the treatment group.
In this particular case, each ad is an experimental unit, and we are able to observe outcomes from both the treatment group and the control group. We want to understand if we should add an image to the ads or not.
In addition, each ad has its feature (e.g., associated company, promoted product, etc.), and we want to understand which group of ads will benefit the most from the addition of images. My question is, in such a case, can we follow the routines in treatment effect analysis? If not, what's a more suitable framework?

I agree that there is some confusion about the "unit" of analysis here. It's neither the ad nor the viewer, though; it's the instance of showing an ad to a viewer. And there is only one potential outcome observed because that instance can only either have an image or not. Because you randomly assigned, you don't have to worry about confounding, which is nice, but that's not the same thing as having both potential outcomes for each unit.
It happens to be that instances are nested within specific ads, but the specific ad is a characteristic of the instance.
You can estimate a number of quantities from this design. You can estimate the average treatment effect of pictures by simply comparing the outcomes between the instance with pictures and the instance without. You should additionally control for the specific ad and any user-level qualities as well to increase the precision of your estimate and improve estimation of the standard error. To do this, you could fit a fixed effects or random effects model with the treatment as the primary predictor and the specific ad as the fixed or random effect grouping variable, e.g., Y ~ treat + (1|ad) if using lme4 for random effects or Y ~ treat | ad if using fixest for fixed effects (the results should be similar).
You can also estimate the ad-specific treatment effect, which is the effect of showing a picture for a specific ad. This is no different from a subgroup average treatment effect; it is essentially interpreted as if you only had one ad but showed it several times with and without the picture. You can estimate these effects in a single model using the following syntax in R: Y ~ ad/treat - 1 in lm(). This gives you a treatment effect for each ad. This would only make sense if you had many instances of each ad with both a picture and no picture.
If you are interested not in specific ads but perhaps the effect of showing the picture for other user- or ad-level characteristics, you can estimate heterogeneous treatment effects using causal trees in the standard way; you just would not include the specific ad as a predictor if you were looking at ad-level characteristics. If you had specific hypotheses, you could also test them in the models above by including the predictor of interest in an interaction with treatment.
