Avoiding loops in Bellman-Ford algorithm
As far as we know, you can't.  The problem of finding the shortest simple path in a graph is NP-hard; it is equivalent to the problem of finding the longest simple path (just negate all edge lengths), which is at least as hard as Hamiltonian path, which is NP-hard.  Therefore you shouldn't any simple modification to Bellman-Ford to yield an efficient algorithm for this problem; best guess right now is that no such algorithm exists.

See also https://cstheory.stackexchange.com/q/17462/5038 and https://en.wikipedia.org/wiki/Longest_path_problem.  According to Wikipedia, the longest path problem is fixed-parameter tractable and can be solved in time exponential in the length of the longest path and linear in the size of the graph, which also applies to your problem as well.