On the day when you performed bharanyasam, if you had intentionally worn tainted clothes, it is a sin. If done unintentionally, there is no harm. There is no relationship between this and bharanyasam.
In general, while prostrating elders, in particular Acaryas, one must maintain purity.
If the deed was done intentionally, it is sinful; the only atonement is to seek forgiveness from Perumal