After researching this in the docs, I found out the following things:

In the blog post I have provided, there is a Data Collator class that is used. This class is responsible for preparing a batch before using it as input for the model. By replicating the inner workings of this class, I realized that the batch it returns does include the feature attention_mask, even though it is not included in the original dataset that is fed to this Data Collator class.
After this, by looking in the docs for the Trainer class and in the docs that show the various Trainer class utilities, in the method train() of the first one can see that the model is iterating over all the batches provided by a PyTorch dataloader. Each batch is passed into the model (see the method compute_loss() in the first link above), by the following line of code: model(**inputs).

Note that the inputs variable is one batch provided to us by the dataloader, which is a dictionary that includes the attention_mask key, as mentioned in my first point. This key is there, and it is not removed anywhere, which leads me to assume that the line model(**inputs) implicitly passes the attention_mask in the model, as requested by the official docs of the Wav2Vec2ForCTC.
This is what I’ve found, and I’d really appreciate it if someone much more experienced than me can confirm these results.