It's understandable but you have the problem that it looks like the bell finished your lecture and then it rang, which is obviously not what you meant. I would assume you meant "After I finished my lecture, the bell rang" or "After finishing my lecture, I heard the bell ring".
It is also ambiguous because I don't know if you were the one giving the lecture (you are the teacher) or listening to the lecture (you are the student).