But I want to know how one can measure if server 'B' has been used for read-only purpose, is there any dmv which tracks it?
No there is no DMV specifically to track whether after configuring readonly replica have u used it or not. You can use sys.dm_db_index_usage_stats to check if database was accessed but again this is not a full proof way. If you configure secondary replica to be read only then you have to license it, it does not matter actually whether you use it for reading or not. The simple step that you configured it as read only would be taken as face value that you would, may be sometime, use it for running read only queries.
If you do not want to keep it in read only then you would not be licensed BUT you hve to also purchase software assurance (SA). If you have no SA you do not get any benefit of free non readable secondary replica