I see my answer wasnt so clear. Let me try again. Your first comment says that given a knot $K:S^1\subset M$ in a 3-manifold, with a choice of framing, i.e. normal vector field to $K$, you can calculate the self-linking number. My first remark is that this is only possible if the knot is nullhomologous, i.e. represents $0$ in $H_1(M)$. For example, there is no self-linking number of the core $0\times S^1\subset D^2\times S^1$ of a solid torus, no matter how you frame it.
If K is nullhomologous, then depending on how you think of homology you see that there is a 2-chain with boundary the knot $K$. It is true, but a bit more work, to see that in fact there exists a oriented embedded surface $C\subset M$ with boundary $K$. (so you can take the 2-chain to be the sum of the triangles in a triangulation of $C$. Then given any other knot $L$ disjoint from $K$ (for example a push off of $K$ with respect to some framing) then the intersection of $C$ with $L$ is by defintion $lk(K,L)$ and is an integer. You may worry about whether it is independent of the choice of $C$, and the answer is yes if $L$ is also nullhomologous, or more generally torsion (i.e. finite order) in $H_1(M)$, and moreover in this case it is also symmetric, $lk(K,L)=lk(L,K)$. Notice that no framing of $K$ or $L$ was used to define $lk(K,L)$.
Now to answer your questions. Since $H_1(S^3)=0$, every knot in $S^3$ is nullhomologous. Thus any two component link in $S^3$ has a well defined integer linking number. You are considering the 2 component link determined by $K$ and a normal framing: the normal framing is used to push off $K$ to get $L=f(K)$. As you note, changing the framing changes the linking number, and in fact by twisting once over a small arc in $K$ you can change it by $\pm1$. Thus there is some framing $f$ so that $lk(K, f(K))=0$, this is the canonical framing (typically called the "0-framing"). It makes sense in $S^3$, or any 3-manifold with $H_1(M)=0$.
For your second question, you are referring to a slightly different concept, which is the linking pairing $lk:Torsion(H_1(M))\times Torsion(H_1(M))\to Q/Z$. It is defined as follows: given $a,b$ torsion classes, then some integer $n$ (for example the order of $torsion(H_1(M))$) has the property that $na$ is nullhomologous. Thus $na$ is represented by a nullhomologous knot, call it $K$. $b$ is also represented by a knot say $L$, which can be perturbed to be disjoint from $K$. Then define $lk(a,b)$ to be $(1/n) lk(K,L)$ mod $Z$, with $lk(K,L)$ as above.
For example, if $P$ is a knot in a lens space $M=L(p,q)$ with $H_1(M)=Z/p$, you could take $a=[P]$ and $b=[P]$ in $H_1(M)$, and then $lk(a,b)=q n^2/p$ for some integer $n$ that depends on $a$. Note that the answer (mod Z!) is independent of how you push $P$ off itself, in particular, the framing of $P$ is irrelevant, and you'll never get $0$ unless $a=0$ (i.e. $P$ is nullhomologous). Note also that if you don't mod out by the integers then the linking pairing is not well defined.