If I used the primary coil as an inductor, does the secondary coil affect it?

As long as the secondary remains open, it's basically not there magnetically or electrically. In that case the primary will look like a regular inductor.

However, transformers don't usually make good inductors. They are usually more lossy, it is often hard to get specs on just the inductance, and the frequency range may be not much more than the transformer was designed for. Above that frequency, you may get significant core losses.


If I changed the frequency or the components of the circuit that contains the primary coil, Will the secondary coil change the inductance of the primary coil?

Taking it a step further than Olin, at medium/high frequencies you cannot ignore the effect of the secondary coil because it has self capacitance between each turn and between winding layers and this self-capacitance forms a load and can affect things on the primary significantly.

It's worse when there are more secondary turns because a transformer is also an "impedance transformer". For instance if there are 100 turns on the primary and 1000 turns on the secondary, a 1 kohm load on the secondary will "look like" 10 ohms connected across the primary. Basically turns-ratio-squared is the math mechanism at work.

So, a 10 pF capacitor at 1 MHz (reactance of 15.9 kohm) will look like a reactance of 159 ohms on the primary. If the secondary has fewer turns (by ten) compared to the primary the capacitor will be unnoticeable at the primary.

You also have to consider that non-ferrite transformers (i.e. ones with laminations) are going to be poor at frequencies much higher than their rated application. Each laminate conducts and acts as a mini shorted turn hence insulated laminates are used to prevent excessive eddy current losses and primary inductance reduction. Even ferrites start to hit problems above 100 kHz so please bear this in mind.