Are there any rules or laws (of the Code of Canon Law) that a Catholic must adhere to if he/she operates a blog or website in which he may teach or write about the Catholic faith?
Code of Canon Law, Book III The Teaching Function of the Church
The Church, to which Christ the Lord has entrusted the deposit of faith so that with the assistance of the Holy Spirit it might protect the revealed truth reverently, examine it more closely, and proclaim and expound it faithfully, has the duty and innate right, independent of any human power whatsoever, to preach the gospel to all peoples, also using the means of social communication proper to it. (Can. 747 §1, emphases mine)
I think that about covers it.
(There's also quite a bit about publishing in Title IV Instruments of Social Communication and Books in Particular.)